Here is my solution. Thank you.
let pElement = React.createElement(‘p’, null, ‘Lorem, ipsum’);
React.createElement(‘div’, {id:“hello”}, pElement);
Here is my solution. Thank you.
let pElement = React.createElement(‘p’, null, ‘Lorem, ipsum’);
React.createElement(‘div’, {id:“hello”}, pElement);
React.createElement( "div", { id: "hello" },
React.createElement("p", null, "Lorem, ipsum.")
);
React.createElement(
“div”,
{id: “hello”},
React.createElement(
“p”,
null,
“Lorem, ipsum.”)
);
React.createElement('div', {
id: 'hello'
}, React.createElement('p', null, 'Lorem, Ipsum'));
React.createElement("div", {id:"hello"}, React.createElement("p", null, "Lorem, ipsum"));
React.createElement(
“div”,
{
id: “hello”
},
React.createElement(
“p”,
null,
“Lorem, ipsom.”
)
);
written correctly
React.createElement(
“div”,
{
id: “hello”
},
React.createElement(
“p”,
null,
“Lorem, ipsom.”
)
);
React.createElement(
"div",
{id: "hello"},
React.createElement("p", null, "Lorem, ipsum.")
);
<div id="hello">
<p>Lorem, ipsum.</p>
</div>
React.createElement("div", {
id: "hello"
}, React.createElement("p",
null,
"Lorem, ipsum."));
React.createElement("div", {
id: "hello"
},React.createElement("p", null, "lorem ,ipsum."));
React.createElement(
"div",
null,
"Lorem, ipsum."
)
<div id="hello">
<p>
Lorem ipsum.
</p>
</div>
React.createElement("div", {
id: "hello"
}, React.createElement("p", null, "Lorem ipsum."));
<!-- Don't use this in production: why - babel should be run before you upload code to the web page. -->
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
ReactDOM.render(
React.createElement(Hello,
{ messagetxt:
'marry had a little lamb chop whose fleas were as white as snow. And every where marry went the smell was sure to follow'
}, null),
document.getElementById('marry')
);
// some more useless text
ReactDOM.render(
React.createElement(Hello,
{ messagetxt:
'people will generally do the right thing ... after exhausting all the other possibilities'
}, null),
document.getElementById('people')
);
// some even more useless text
ReactDOM.render(
React.createElement(Hello,
{ messagetxt:
'when my kids start whining about something I tell them "Harden up mate! or you will never be THE MAN your monther was"'
}, null),
document.getElementById('mykids')
);
</script>
React.createElement("div", {id: "hello"},
React.createElement("p", null, "Lorem, ipsum.")
);
"use strict";
/*#__PURE__*/
React.createElement("div", {
id: "hello"
}, /*#__PURE__*/React.createElement("p", null, "Lorem, ipsum."));
The code seems generated due to the PURE comment. If you wrote it yourself, then you don’t need it, it’s just FYI from the generator/transpiler.
React.createElement(“div”, { id = “hello” },
React.createElement(“p”, null, “Lorem, ipsum.”)
);
React.createElement(“div”, {
id: “hello”
}, React.createElement(“p”, null, “Lorem, ipsum.”)
);
@Lizette I’m stuck in the Class components 2 class , since there is no forum link to that class, I thought it might be a good idea to post it here … could you please let Zsolt know this? … I did everything exactly as he is doing it, and I cannot get my table displayed… this is my result … just an empty table
and this is my code:
Name | Ticker | Price |
---|
class Coin extends React.Component {
/*
constructor(props) {
super(props)
}
*/
render(){
return (
<tr>
<td>(this.props.name)</td>
<td>(this.props.ticker)</td>
<td>(this.props.price)</td>
</tr>
);
}
}
ReactDOM.render(
<React.Fragment>
<Coin name="Bitcoin" ticker="BTC" price="$13300.00" />
<Coin name="Polkadot" ticker="DOT" price="4.09" />
</React.Fragment>,
document.getElementById('root')
);
React.createElement(
React.Fragment,
null,
);
</script>