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.
13 lines
563 B
13 lines
563 B
11 years ago
|
---
|
||
11 years ago
|
id: maximum-number-of-jsx-root-nodes
|
||
11 years ago
|
title: Maximum Number of JSX Root Nodes
|
||
11 years ago
|
layout: tips
|
||
11 years ago
|
permalink: maximum-number-of-jsx-root-nodes.html
|
||
11 years ago
|
prev: self-closing-tag.html
|
||
11 years ago
|
next: style-props-value-px.html
|
||
11 years ago
|
---
|
||
|
|
||
11 years ago
|
Currently, in a component's `render`, you can only return one node; if you have, say, a list of `div`s to return, you must wrap your components within a `div`, `span` or any other component.
|
||
11 years ago
|
|
||
11 years ago
|
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.
|