We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aee813f commit 8b1f6d0Copy full SHA for 8b1f6d0
README.md
@@ -21,10 +21,12 @@ yarn add react-dynamic-route
21
App.js
22
```jsx
23
import React from 'react'
24
+import { BrowserRouter } from 'react-router-dom'
25
import DynamicRoute from 'react-dynamic-route'
26
27
export default function App() {
28
return (
29
+ <BrowserRouter>
30
<DynamicRoute
31
page={path => import('./pages' + path).then(module => module.default)}
32
loading={<div>Loading..</div>}
@@ -33,6 +35,7 @@ export default function App() {
33
35
someProp2, // `someProp1` and `someProp2` are transfered to `module.dedault` above finally
34
36
}}
37
/>
38
+ </BrowserRouter>
39
)
40
}
41
```
0 commit comments