2 ms·
If you're doing something something reasonably small, using preact rather than react and then wrapping it into a web component so you can just ... put it in the
by mst 2y ago
If you're doing something something reasonably small, using preact rather than react and then wrapping it into a web component so you can just ... put it in there ... is a really nice option to have.
(it may not be the right option in any given case, but it's worth knowing it's there even so)
- throwitaway1123 2y agoPreact is definitely a good choice if you're looking for something lightweight. React-dom was already relatively hefty, and seems to have gotten even larger in version 19. Upgrading the React TypeScript Vite starter template from 18 to 19 increases the bundle size from 144kB to 186kB on my machine [1][2]. They've also packaged it in a way that's hard to analyze with sites like bundlephobia.com and pkg-size.dev. [1] https://github.com/facebook/react/issues/27824 https://github.com/facebook/react/issues/27824 [2] https://github.com/facebook/react/issues/29913 https://github.com/facebook/react/issues/29913