React Hooks are becoming more prevalent and supported by React >16.8.0 onward.
After much experimentation, I have mot found a way to work with hooks using react-dart.
In the example below useHistory() is a hook in the latest version of ReactRouter.
import { useHistory } from "react-router-dom";
function HomeButton() {
const history = useHistory();
function handleClick() {
history.push("/home");
}
return (
<button type="button" onClick={handleClick}>
Go home
</button>
);
}
How would it be possible to implement the code above using react-dart?
React Hooks are becoming more prevalent and supported by React >16.8.0 onward.
After much experimentation, I have mot found a way to work with hooks using
react-dart.In the example below
useHistory()is a hook in the latest version of ReactRouter.How would it be possible to implement the code above using react-dart?