react-sweet-state icon indicating copy to clipboard operation
react-sweet-state copied to clipboard

[Documentation request] Comparison of bundle sizes

Open matthew-dean opened this issue 3 years ago • 2 comments

Can you add in https://atlassian.github.io/react-sweet-state/#/introduction/comparison how this library compares to others in terms of bundle size? And do you know this information off-hand?

For example, the docs say:

sweet-state was developed to solve some pain points within a 1M+ lines codebase

That sounds like an awful lot, which seems like a drawback of react-sweet-state, but it's not actually clear how this compares.

matthew-dean avatar May 10 '22 19:05 matthew-dean

It looks like React-sweet-state is much bigger than Redux, is that correct?

Screen Shot 2022-05-10 at 12 16 11 PM Screen Shot 2022-05-10 at 12 16 23 PM

matthew-dean avatar May 10 '22 19:05 matthew-dean

If you look at redux standalone, absolutely. But usually you don't use it on its own, you use it via react-redux bindings, which means you need to add 14.4KB to those 4.4KB. So the fair-ish comparison is:

  • redux + react-redux: 18.8KB (min)
  • react-sweet-state: 10.2KB (min)

Making RSS almost 50% more lightweight. I might think of a way to call it out in the comparison, however need to find a way to keep it up to date, as both projects care about performance and bundle size so improvements between versions are to be expected.

albertogasparin avatar May 10 '22 23:05 albertogasparin