File tree 3 files changed +27
-0
lines changed
3 files changed +27
-0
lines changed Original file line number Diff line number Diff line change
1
+ package src .react .router ;
2
+
3
+ /*
4
+ * Avaliable for versions 4.0.0 and above
5
+ */
6
+
7
+ #if (jsImport)
8
+ @:js.import (' react-router-dom' , ' BrowserRouter' )
9
+ #else
10
+ @:jsRequire (' react-router-dom' , ' BrowserRouter' )
11
+ #end
12
+ extern class BrowserRouter extends react. ReactComponent {}
Original file line number Diff line number Diff line change
1
+ package src .react .router ;
2
+
3
+ /*
4
+ * Avaliable for versions 4.0.0 and above
5
+ */
6
+
7
+ #if (jsImport)
8
+ @:js.import (' react-router-dom' , ' HashRouter' )
9
+ #else
10
+ @:jsRequire (' react-router-dom' , ' HashRouter' )
11
+ #end
12
+ extern class HashRouter extends react. ReactComponent {}
Original file line number Diff line number Diff line change @@ -11,4 +11,7 @@ extern class Statics {
11
11
static public var hashHistory : HashHistory ;
12
12
static public var browserHistory : BrowserHistory ;
13
13
static public var withRouter : Dynamic -> Dynamic ;
14
+
15
+ static public function useLocation <T >(): T ; // Avaliable for versions 4.0.0 and above
16
+ static public function useHistory <T >(): T ; // Avaliable for versions 4.0.0 and above
14
17
}
You can’t perform that action at this time.
0 commit comments