Hi! Hooks unfortunately require function components to work, but you could recreate the same functionality with either a HOC or just directly in your class component. In your componentDidUpdate, add a line that serializes and saves your state to local storage.
Hi! Hooks unfortunately require function components to work, but you could recreate the same functionality with either a HOC or just directly in your class component. In your
componentDidUpdate, add a line that serializes and saves your state to local storage.When you initialize the state, you need to do the reverse:
Hope that helps!