You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
654 B
654 B
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 |
Problem
You're getting a parsing error from JSX.
Solution
You might have tried to return more than one node in your component's render
. Currently, you can only return one node, meaning that you must wrap your components within, say, a div
or a span
(or any other component).
Discussion
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.