react-code-dataset / tabler-react /src /helpers /RouterContextProvider.react.js
Devendra174's picture
Upload folder using huggingface_hub
1e92f2d verified
raw
history blame
420 Bytes
// @flow
import * as React from "react";
type Props = {|
+location: Object,
+callback: (location: { pathname: string }) => void,
|};
type State = {||};
class RouterContextProvider extends React.Component<Props, State> {
componentDidMount(): void {
const { callback, location } = this.props;
callback(location);
}
render(): React.Node {
return null;
}
}
export default RouterContextProvider;