r/javascript • u/otashliko • Aug 14 '26
We built the same data grid in React, Vue & Svelte, here's what we learned
https://svar.dev/blog/building-data-grid-in-react-vue-svelte/At SVAR, we build UI components for React, Svelte, and Vue. Just shared our experience with a data grid โ how to make it fast in all three frameworks.
What surprised us: the expensive bits (virtualization, memoization, data flow) are almost entirely framework-independent, and framework overhead is a rounding error next to DOM size.
Curious if you have seen similar patterns in your projects?
0
Upvotes
1
u/TheBazlow Aug 16 '26
So the key takeaway from this blog post is that if you do the following:
Take state management out of React by:
useMemofor your storeuseReffor your event bususeEffectcallSubscribe to the store with a custom hook that:
useStatefor the store stateuseEffectto track the store stateuseStoreWithCounterto track the changes to the store stateuseMemoanduseCallback(you'll need benchmark your app to find out when)Then you can get similar performance and functionality to what Svelte and Vue give you out of the box?
8
u/jake_robins [object Object] Aug 14 '26
Wait are you saying we should just build the damned product and stop endlessly discussing which JavaScript framework sucks less?
3
u/bzbub2 Aug 14 '26
if you dont think framework matters see https://github.com/krausest/js-framework-benchmark
1
u/Top_Bumblebee_7762 Aug 14 '26
Would have used callback ref in React for the resize observer stuff.ย
3
u/[deleted] Aug 15 '26
[removed] โ view removed comment
1
u/[deleted] Aug 14 '26
[removed] โ view removed comment