⬅️ JavaScript ⬅️ Pointer
from: https://www.pointer.io/tags/javascript
JavaScript Bloat in 2024
🔗 here tldr: 10MB of JavaScript is not a lot? 🤷♂️
Writing Javascript without a build system
🔗 here
Build systems can do lots of useful things, like:
- combining 100s of JS files into one big bundle (for efficiency reasons)
- translating Typescript into Javascript
- typechecking Typescript
- minification
- adding polyfills to support older browsers
- compiling JSX
- treeshaking (remove unused JS code to reduce file sizes)
- building CSS (like tailwind does)
- and probably lots of other important things
Examples of build systems:
- webpack, rollup, esbuild, parcel, or vite
A virtual DOM in 200 lines of JavaScript
- The goal of a virtual DOM: It’s not about performance. A Virtual DOM is an abstraction to simplify the act of modifying a UI.
- Create a virtual representation of the DOM
- Diff virtual DOM nodes
- Apply a virtual DOM diff to an HTML element