0
0
JRJose Romero
The function NewEvent() creates a new form. Within the function, the code creates an input field for the title and a text input field for the description. The event handler functions are then called when the form is submitted. The first function, named "__construct", is called when the form is loaded. The second function, named "EVENT", is called when the user clicks the "Submit" button on the form.
Library: remix
Shortcut: remix.form.create
import { Form } from "remix";
function NewEvent() {
return (
<Form method="post" action="/events">
<input type="text" name="title" />
<input type="text" name="description" />
</Form>
);
}