New to React so this is probably a stupid question:
I've got a component that I want to replace with an alternate component (I think), so that if I click on a button that exists for editing the details, it will replace the display stuff with editing. The idea being that I start out rendering
<div>
<h1>{this.props.journal.name}</h1>
<button>Edit details</button>
</div>
and I click on the button and it turns into
<div>
<form>
<input type="text" value={this.props.journal.name} />
<button>Save</button>
<button>Cancel</button>
</form>
</div>
How would I manage this? I'm guessing that I should be doing something with state as well.