React.js is a library that helps you build page UI. We have summarized the common problems in react.js. Everyone is interested in react.js. If you don’t know much about it or don’t know much about it, you can refer to it! Without further ado, let’s get to the topic!
Example: When we write it in the following way
render: function () { return ( <h2>齐天大圣</h2> ); }
can render normally, but what if we add another tag?
render: function () { return ( <h2>齐天大圣</h2> <h2>猪八戒</h2> ); }
There is no rendering effect at this time, what should I do? Just wrap one tag outside the two h2 tags. Only one label can be rendered by default after return.
render: function () { return ( <p> <h2>齐天大圣</h2> <h2>猪八戒</h2> </p> ); }
The above is all the content of this article. This article may not be the most complete. You can search related articles on the PHP Chinese website !
Related recommendations:
The above is the detailed content of Explain common problems and solutions in react.js. For more information, please follow other related articles on the PHP Chinese website!