Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the maximum memory size of the redux store?

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?

like image 785
Malkhazi Dartsmelidze Avatar asked Dec 11 '18 07:12

Malkhazi Dartsmelidze


People also ask

Is Redux store in memory?

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.

How much data can I store in Redux persist?

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.

How big is Redux?

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.


1 Answers

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.

like image 188
lecstor Avatar answered Sep 21 '22 11:09

lecstor