When component needs a single root element?

Posted by Jennifer | Updated on

Every component must have a single root element when template has more than one element. In this case, you need to wrap the elements with a parent element.

Otherwise there will an error throwing, saying that “Component template should contain exactly one root element…”.

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