I agree, I don't think there is a compelling reason to use react instead of react. Every time I migrated a client most engineers didn't even notice and you just saved shipping a heavy bundle. Compatibility is really good, most third party components work and the few which don't are covered by alternative implementations.
Etsy Moves from React to Preact
11–20 of 71 posts
Re: Etsy Moves from React to Preact
#12One thing I don't understand about the JS ecosystem in general is the focus on minified size. This article does the same thing: preact is 6k or so whereas react is 36k. This comparison seems entirely pointless when the first page load downloads multiple megabytes of assets and, additionally, a lot of users would have React in their browser cache anyway.
Re: Etsy Moves from React to Preact
#13> One important piece of context is that Etsy currently has two major product stacks. For buyer-facing pages, we use PHP server-based rendering with jQuery/vanilla JS on the client to stitch things together. For our seller-facing pages and many of our internal tools, we use React-rendered SPAs with minimal server-based HTML rendering, receiving data from the same PHP server-side stack. The unreasonable effectiveness…
I imagine the client facing pages are very sensitive to seo/crawling so that's why they go for server side rendering
Re: Etsy Moves from React to Preact
#14One thing I don't understand about the JS ecosystem in general is the focus on minified size. This article does the same thing: preact is 6k or so whereas react is 36k. This comparison seems entirely pointless when the first page load downloads multiple megabytes of assets and, additionally, a lot of users would have React in their browser cache anyway.
Re: Etsy Moves from React to Preact
#15Re: Etsy Moves from React to Preact
#16> One important piece of context is that Etsy currently has two major product stacks. For buyer-facing pages, we use PHP server-based rendering with jQuery/vanilla JS on the client to stitch things together. For our seller-facing pages and many of our internal tools, we use React-rendered SPAs with minimal server-based HTML rendering, receiving data from the same PHP server-side stack. The unreasonable effectiveness…
It's feels almost as if... PHP was made for this web stuff. What a lucky coincidence!
Re: Etsy Moves from React to Preact
#17Does anyone know how to get off Angular?
The only way is rewriting the front-end in a different framework. If you can, you probably should do it all at once. If doing it all at once is too much work, you can look at web components as a technology to have both in the same page. Angular elements allows wrapping angular code and putting it inside another framework. Angular also makes it easy to embed web components into its pages, so you could rewrite piece by…
Re: Etsy Moves from React to Preact
#18One thing I don't understand about the JS ecosystem in general is the focus on minified size. This article does the same thing: preact is 6k or so whereas react is 36k. This comparison seems entirely pointless when the first page load downloads multiple megabytes of assets and, additionally, a lot of users would have React in their browser cache anyway.
Minification or not, starting with a 6x bundle size puts you in a precarious position to have to care more about how it grows over time adding other assets.
Downloading, parsing and then executing a larger bundle size will impact performance and we've been able to see time to interactive impact conversion on e-commerce sites. However you are right that there are many other factors at play here that will make the site better and I think the post misses the point about "bundle size".
The important differentiation for us with Preact is two things: native support for web components, and a significantly faster library when it comes to transformations and dealing with vdom - see here https://rawgit.com/krausest/js-framework-benchmark/master/we...
On your comment about browser cache, also true but it really depends - if you haven't appropriately split out your bundle then returning users will probably be redownloading react again and again with app updates. Also new users are super important because if you are trying to get new traffic you care about their experience not just returning users.
Re: Etsy Moves from React to Preact
#19One thing I don't understand about the JS ecosystem in general is the focus on minified size. This article does the same thing: preact is 6k or so whereas react is 36k. This comparison seems entirely pointless when the first page load downloads multiple megabytes of assets and, additionally, a lot of users would have React in their browser cache anyway.
Not on the first load. If you mean that it will be cached from other sites through the same CDN, then that's also unfortunately not true anymore since cache partitioning [1].
[1] https://www.peakhour.io/blog/cache-partitioning-firefox-chro...
Re: Etsy Moves from React to Preact
#20One thing I don't understand about the JS ecosystem in general is the focus on minified size. This article does the same thing: preact is 6k or so whereas react is 36k. This comparison seems entirely pointless when the first page load downloads multiple megabytes of assets and, additionally, a lot of users would have React in their browser cache anyway.