I have an HTML form in my project, which is partially written with React (Don't ask me why. Historical issues.) Consider it to look like this:
<html>
<form>
<input type="text" name="name" />
<div id="app"><!-- React component here --></div>
</form>
</html>
Then the react code, effectively like this:
ReactDOM.render(
<div>
<input type="text" />
</div>,
app // consider this is the #app element
);
How can I stop the form from submitting with "enter" key by just changing the input element in my React component? Or is it possible?