JavaScript Daily
12.1K subscribers
34 photos
2 videos
270 links
Daily JavaScript / JS community news, links and events.

"First, software ate the world, the web ate software, and JavaScript ate the web."

'JavaScript' is a trademark of Oracle Corporation in the US. We are not endorsed by or affiliated with Oracle.
Download Telegram
Did JavaScript just got faster ?

Bun is a modern JavaScript runtime like Node or Deno. It was built from scratch to focus on three main things:
- Start fast (it has the edge in mind).
- New levels of performance (extending JavaScriptCore, the engine).
- Being a great and complete tool (bundler, transpiler, package manager).

Bun uses the JavaScriptCore engine(WebKit), which tends to start and perform a little faster than more traditional choices like V8.

Bun is written in Zig, a low-level programming language with manual memory management.

Most of Bun is written from scratch including the JSX/TypeScript transpiler, npm client, bundler, SQLite client, HTTP client, WebSocket client and more.

https://bun.sh/


πŸ”₯ Follow @javascriptdaily πŸ”₯
πŸ”₯21πŸ‘19❀1πŸ’―1
Introduction to Signals

Angular announced they are adopting Signals to achieve reactivity
πŸ‘19
There has been some buzz recently in the frontend world around the term "Signals". In seemingly short order they seem to be everywhere showing up in everything from Preact to Angular.

But they are not a new thing. Not even remotely if you consider you can trace roots back to research in the late 1960s. At its foundation is the same modeling that enabled the first electronic spreadsheets and hardware description languages (like Verilog and VHDL).

Even in JavaScript, we've had them since the dawn of declarative JavaScript Frameworks. They've carried various names over time and come in and out of popularity over the years. But here we are again, and it is a good time to give a bit more context on how and why.

πŸ”₯ Follow @javascriptdaily πŸ”₯


https://dev.to/this-is-learning/the-evolution-of-signals-in-javascript-8ob
πŸ‘8❀1😒1
2023 Web Framework Performance Report

- How do modern web frameworks compare in real-world usage & performance?
- Does framework choice influence a site’s Core Web Vitals?
- How related is framework choice to JavaScript payload size, and what is the impact?

Take a look at the report by #FredSchott from #Astro. Please keep in mind of the methodology and limitations.

πŸ”₯ Follow @javascriptdaily πŸ”₯

https://astro.build/blog/2023-web-framework-performance-report/
πŸ‘2πŸ₯°1
WTF Is Code Extraction
By #MiΕ‘koHevery (Builder.io / #Qwik)

We are full-stack developers! That means we write both client and server code. But where should we place the server and client code? Conventional wisdom says that we should put them in different files. Except, it is not so simple; we also have code that runs both on the server and client. After all, we do Server-side rendering (SSR), so most of our client code also runs on the server.

I want to challenge the conventional wisdom and convince you that there is an existing trend of putting server and client code together and that it is better. Let’s call it: β€œcode collocation.”

The idea of placing server and client code together is not new, and it is already happening in NextJS/Remix/SolidJS.

But we have a problem to solve. We need to provide code to the server and code to the client, and as of right now, server code can’t access the DOM API and client code can’t read server dependencies such as databases. So there needs to be a way to separate the code.

The act of separating the code and creating server and client code bundles is called code extraction. Three different strategies starting with the most basic to advanced ones, are:
- Export extraction
- Function extraction
- Closure extraction

Let’s dive into them.

πŸ”₯ Follow @javascriptdaily πŸ”₯

https://www.builder.io/blog/wtf-is-code-extraction
πŸ‘12πŸ”₯3❀2
TypeScript 5.0 rebuilt to use ECMAScript modules

With TypeScript 5.0, the TypeScript development team has restructured the entire codebase to use ECMAScript modules, reducing package size and improving performance.

TypeScript 5.0, due from Microsoft as a production release on March 16, has been restructured around the use of ECMAScript modules, a major infrastructure change for the strongly typed JavaScript variant.

Users of TypeScript 5.0, which currently is in a release candidate stage, will need to run Node.js 12 at a minimum. In return, npm installs promise to execute a little faster and take up less space, with the typescript package sized reduced by roughly 46%, Microsoft said in a March 9 bulletin. TypeScript too will be faster, with build times cut by 10% to 25%. API consumers of TypeScript likely will be unaffected.

πŸ”₯ Follow @javascriptdaily πŸ”₯

https://www.infoworld.com/article/3690342/typescript-50-rebuilt-to-use-ecmascript-modules.html
πŸ‘6❀1
32 Awesome JavaScript Snippets (one-liners) You Should Use

Some useful JavaScript stuff I have saved and I think it can help make your life as a developer easier.

πŸ”₯ Follow @javascriptdaily πŸ”₯

https://www.rahul.biz/blog/32-javascript-snippets
πŸ‘13❀3πŸ”₯2πŸ₯°1πŸ‘1😁1
πŸ‘3
πŸ”₯24πŸ‘14❀11
😁9πŸ‘3
ECMAScript excitement πŸ˜‰

These proposals advanced #TC39 this week πŸŽ‰

3️⃣ Async Explicit Resource Mgmt
3️⃣ Import Attributes (*)
2️⃣ AsyncContext
2️⃣ Float16Array
2️⃣ Iterator.range
1️⃣ Await Dictionary
1️⃣ Class Method Param Decorators
1️⃣ Promise.withResolvers
1️⃣ TZ Canonicalization


πŸ”₯ Follow @javascriptdaily πŸ”₯
πŸ‘20❀2πŸ‘1
What's the best article you've read in the JavaScript or front-end space lately?
πŸ‘2
Storybook provides a workshop to build UIs in isolation. It helps you develop hard-to-reach states and edge cases without needing to run the whole app.

https://storybook.js.org/
πŸ‘21πŸ₯°3πŸ”₯2