Ejemplo 1: react.createElement
//Below I use the React.createElement() function to create a virtual DOM
//representation of a <li> element node containing a text node of one (a.k.a.,
//React text) and an id of li1.
var reactNodeLi = React.createElement('li', {id:'li1'}, 'one');
Ejemplo 2: React.createElement
const e = React.createElement;
ReactDOM.render(
e('div', null, 'Hello World'),
document.getElementById('root')
);
¡Haz clic para puntuar esta entrada!
(Votos: 0 Promedio: 0)