How to connect my index.html into App.js (React)?
<div class="content">
<form action="v2/v2.html" class="form">
<label for="user">Nama</label>
<input type="text" name="user" id="user" />
<button type="button" id="load-app">Load App</button>
</form>
</div>
<script src="v3-website/src/App.js"></script>
so when I click the button I want it to direct into App.js
can someone tell me how to do that?
I use anchor
tag it don’t work
2
Answers
Yes, you can use Javascript
CustomEvent
to communicate between React Virtual DOM and javascript real dom.referent the below snippet.
Assuming you are trying to redirect to a react app on button submit, do the following steps:
action
attribute.method="GET"
.Details
build
directory.action
attribute.