Why can both vue's template and react's render functions have only one root element?

Mar.21,2021

just as a HTML document can have only one root element.
multiple root elements must make it impossible to form a tree


react version 16.3 provides the fragment function so that it can return multiple elements

Menu