File size: 420 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// @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;