I've been experimenting with React. In my experiement, I'm using the Reactstrap framework.When I click a button, I've noticed that the HTML form submits. Is there a way to prevent form submission when a button is clicked?
I've recreated my issue here. My form is pretty basic and looks like this:
<Form>
<h3>Buttons</h3>
<p>
<Button color="primary" onClick={this.onTestClick}>primary</Button>
</p>
</Form>
What am I missing?
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…