This is the initial html structure. There is container with id="container". I have rendered a Card component inside this container.
<div id="container">
<div>
<img src="https://avatars.githubusercontent.com/u/k8297" style="width: 75px;"><div>
<div>Nishaant</div>
<div>Age 22</div>
</div>
</div>
Now i want another card to get concatenate to this container using react.js
I have tried
ReactDOM.render(<Card key={employee.name} name={employee.name} company={employee.company} url={employee.url}/>,document.getElementById('container'));
But this overwrites the existing data inside the container div. I want the new data to be appended to the existing data.
<div id="container">
<div>
<img src="https://avatars.githubusercontent.com/u/k8297" style="width: 75px;"><div>
<div>User 1</div>
<div>Age 22</div>
</div>
<div>
<img src="https://avatars.githubusercontent.com/u/k8297" style="width: 75px;"><div>
<div>User 2</div>
<div>Age 26</div>
</div>
</div>
Like above...