import React, { ChangeEvent, Component, FormEvent, PureComponent } from "react";
import { createRoot } from "react-dom/client";
class MyForm extends PureComponent {
state = { email: "test" };
render() {
return (
);
}
private _handleSubmit = (e: FormEvent) => {
e.preventDefault();
console.log(`Form state`, this.state);
};
private _handleChange = (e: ChangeEvent) =>
this.setState({ name: e.target.value });
}
// Application
class App extends Component {
state = { authenticated: true };
render() {
return ;
}
}
const container = document.getElementById("root");
createRoot(container!).render(
);