What is the purpose of keep alive tag?

Posted by Jennifer | Updated on

Keep-alive tag is an abstract component used to preserve component state or avoid re-rendering. When you wrapped tag around a dynamic component, it caches the inactive component instances without destroying them.

Let’s see the example usage of it:

Note: Remember that keep-alive tag doesn’t render a DOM element itself, and doesn’t show up in the component parent chain.

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