Trying to add items to a useState array, but it clears on refresh

This page summarizes the projects mentioned and recommended in the original post on

Our great sponsors
  • Appwrite - The Open Source Firebase alternative introduces iOS support
  • Scout APM - Less time debugging, more time building
  • SonarLint - Clean code begins in your IDE with SonarLint
  • redux

    Predictable state container for JavaScript apps

    Redux is likely overkill in this situation. For sharing global state, state management libraries are certainly the way to go, but ephemeral state should not go into a store: state that is only used within a single logical component is better off in useState or useReducer hooks.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts