user
01/13/2020, 10:56 AMwrap by adding @:wrap(react.router.ReactRouter.withRouter) to the Component and then adding history as prop?
Usually I do this:
import react.router.ReactRouter;
import react.router.Route.RouteRenderProps;
private typedef Props = {
> PublicProps,
> RouteRenderProps,
}
private typedef PublicProps = {
// ...
}
@:publicProps(PublicProps)
@:wrap(ReactRouter.withRouter)
class MyComponent extends ReactComponentOfProps<Props> { /* ... */ }