I'm using controlled components in my React forms. My concern is those input fields where the user can type in text that can be long.
Because I'm using Redux for state management, state is immutable. So, in a description field, if I were to type, "Some description!", the state values that are kept in my redux store are:
S
So
Som
Some
Some
Some d
Some de
[and so on]
In the life time of a user's session, memory usage can get a bit heavy just storing all the previous states of these form fields. This is especially concerning on mobile devices with limited system resources.
What's a good strategy to manage memory consumption of my redux store? Is there a way to flush out some parts of the store? I wouldn't want to wipe out everything but it would be beneficial if some parts could be flushed out in a controlled way.