I am writing an App in React. I am using Redux to store my data on page. This Data contains a huge user object ( nested max. 3 levels ) which contains all user data. I am using it almast anywhere so I think that it is good to store it in redux and not to request it from server everytime when I need it. This Data can be about 70-80 KB but I think average size of each user will be 30-40 kb.
This data is modified with combined of 5-6 reducers and 30-50 actions. I have one component which uses all of this data and 10-15 components which uses some part of it.
can redux store be almost 100 kb in size?
does it affect the App performance?
can any browser handle my app without any performance issues?
Can you provide your average redux store size?
What is the average number of actions and reducers one can have?
The state in Redux is stored in memory. This means that, if you refresh the page the state gets wiped out. The state in redux is just a variable that persists in memory because it is referenced by all redux functions.
If you don't want to use AsnycStorage there are alternatives like redux-persist-fs-storage or redux-persist-filesystem-storage which get around the 6MB limitation on Android.
You can use Redux together with React, or with any other view library. It is tiny (2kB, including dependencies), but has a large ecosystem of addons available.
Open "More Tools" -> "Task Manager" in Chrome.
Open the twitter web app and find the tab in Task Manager. Mine started at 120MB.
Start scrolling and see how long it takes to crack 500MB.
I know it's not directly related to data stored in Redux considering most of it is gifs, etc, but it is related I think it demonstrates that talking about limits of 100KB is not worth the thought involved. I'd be very surprised if you could find a device with a browser that had any issues with even 10MB.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With