Skip to content
Advertisement

how to render multiple children without JSX

How to write this without using JSX?

JavaScript

This comes from the react.js tutorial: http://facebook.github.io/react/docs/tutorial.html

I know I can do the following:

JavaScript

But this only adds one element. How can I add more next to one another.

Advertisement

Answer

You can use the online Babel REPL (https://babeljs.io/repl/) as a quick way to convert little chunks of JSX to the equivalent JavaScript.

JavaScript

It’s also handy for checking what the transpiler outputs for the ES6 transforms it supports.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement