I have the following code in React and I have no idea why it doesn't work. Basically I want it to add an instance of my component whenever the button is clicked.
addList = () => {
return <List />
}
render() {
return (
<div>
<button onClick={ this.addList }>Add new list</button>
</div>
);
}