I spent 6 days building my VDOM library as I hated how React handles memo
A developer spent 6 days building their own Virtual DOM library called Tyaff, driven by frustration with how React handles memoization and re-rendering.
Background
- **Virtual DOM (VDOM)** is a programming concept where a lightweight copy of the real web-page DOM (Document Object Model) is kept in memory; libraries compare (diff) the virtual copy with the real DOM and apply only the minimal changes needed, rather than re-rendering the entire page.
- **React** is the dominant front-end JavaScript library for building user interfaces, created by Meta (Facebook). It popularized the VDOM approach.
- **Memoization (memo)** in React refers to techniques like `React.memo`, `useMemo`, and `useCallback` that try to prevent unnecessary re-renders of components by caching results. Many developers find React's memo APIs confusing, error-prone, and verbose — you have to manually annotate which parts of the component tree should skip re-rendering.
- The author built their own library called **Tyaff** (a VDOM library) from scratch over 6 days, specifically to create a system where intelligent default memoization happens automatically, removing the need for developers to manually sprinkle `memo()` or `useMemo()` everywhere. This reflects a broader frustration in the front-end community with React's current memoization ergonomics.