Keep component state persistent in a ListView after scrolling off the screen

I have page with ListView containing a list of custom component with a few Component States. This ListView gets the list data from a backend API calls and pass parameters to each Component. In each component, it updates its own Component State after some interaction, such as clicking a button in it.

However, I know it's by design that each Component will be re-initialized when it becomes off-screen/not visible, and back to the screen/visible again. (by scrolling). Since each component gets its states from the passing parameters from the ListView, so it gets "reset" to the original states whenever it's off-screen and back to screen again.

What's the best way / best practices to keep these component states persistent without recalling the backend API?

Thank you!

3
2 replies