How to hide/show components without losing their internal state in ReactJS?

Posted by Pinki | Updated on

If you want to hide/show components without losing their internal state in ReactJS? One option would be to move the conditional inside the component itself:

Whether this is “best practise” or not probably depends on the exact situation.


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers