React.useState + useContext combo is a possible way to lift the state up, but these tools out of the box are not optimal - two issues are 1) code complexity as discussed above and 2) bad performance on frequent state changes. However, there is a supercharged React.useState wrapper, called Hookstate github.com/avkonst/hookstate, which makes lifting the state up easy and efficient. It made Redux dead for me and for at least few other people, because it is simpler and faster. Disclaimer: I am an author of the project.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
React.useState + useContext combo is a possible way to lift the state up, but these tools out of the box are not optimal - two issues are 1) code complexity as discussed above and 2) bad performance on frequent state changes. However, there is a supercharged React.useState wrapper, called Hookstate github.com/avkonst/hookstate, which makes lifting the state up easy and efficient. It made Redux dead for me and for at least few other people, because it is simpler and faster. Disclaimer: I am an author of the project.