Cheng Lou
11 years ago
committed by
Connor McSheffrey
2 changed files with 25 additions and 0 deletions
@ -0,0 +1,10 @@ |
|||
--- |
|||
id: jsx-root-node-count-tip |
|||
title: Maximum number of JSX root nodes |
|||
layout: docs |
|||
permalink: jsx-root-node-count-tip.html |
|||
--- |
|||
|
|||
Currently in `render`, you can only return one node; if you have, say, a list of divs to return, you must wrap your components within, say, one big `div` or `span` (or any other component). |
|||
|
|||
Don't forget that JSX compiles into regular js, and returning two functions doesn't really make syntactic sense. |
@ -0,0 +1,15 @@ |
|||
--- |
|||
id: jsx-root-node-count |
|||
title: Maximum number of JSX root nodes |
|||
layout: docs |
|||
permalink: jsx-root-node-count.html |
|||
--- |
|||
|
|||
### Problem |
|||
You're getting a parsing error from JSX. |
|||
|
|||
### Solution |
|||
You might have tried to return more than one node from JSX in `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, and returning two functions doesn't really make syntactic sense. |
Loading…
Reference in new issue