'how to add items to var #<Object> in React
I have the next var in the render method, but I want to add more items in the div id='test'
export default class Home extends React.Component {
render() {
let view = <div id='test' className='container is-fluid'>
<div class="tile is-parent">
<article class="tile is-child box">
<p class="title">Hello World</p>
<p class="subtitle">What is up?</p>
</article>
</div>
</div>
return (
{var}
)
}
and I want something like
view.appendChild(
<div class="tile is-parent">
<article class="tile is-child box">
<p class="title">Hello World</p>
<p class="subtitle">What is up?</p>
</article>
</div>
)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
