A
A
Azad Kichibekov2020-12-19 22:35:25
JavaScript
Azad Kichibekov, 2020-12-19 22:35:25

How to save the state when unmount-e?

Here is a good example: https://codesandbox.io/s/cool-roentgen-6pk1u
Change the state. Next, click on unmount. Why does the state remain initial after unmout, and how to save it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dmitry-toster, 2020-12-20
@rally08

Why does the state remain initial after unmout

Because this is the local state of the component
and how to save it?

1. in the parent component
2. in the global store like redax
3. in localStorage

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question