Files
react.dev/cookbook/05-jsx-root-node-count.md
Connor McSheffrey 3b8c13d08d Removed Q&A format
2013-10-29 10:42:47 -07:00

540 B

id, title, layout, permalink, prev, next
id title layout permalink prev next
jsx-root-node-count Maximum number of JSX root nodes cookbook jsx-root-node-count.html self-closing-tag.html style-prop-value-px.html

Currently, in a component's render, you can only return one node; if you have, say, a list of divs to return, you must wrap your components within a div, span or any other component.

Don't forget that JSX compiles into regular js; returning two functions doesn't really make syntactic sense. Likewise, don't put more than one child in a ternary.