Skip to content

Commit 8b1f6d0

Browse files
committed
upate README.md
1 parent aee813f commit 8b1f6d0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,12 @@ yarn add react-dynamic-route
2121
App.js
2222
```jsx
2323
import React from 'react'
24+
import { BrowserRouter } from 'react-router-dom'
2425
import DynamicRoute from 'react-dynamic-route'
2526

2627
export default function App() {
2728
return (
29+
<BrowserRouter>
2830
<DynamicRoute
2931
page={path => import('./pages' + path).then(module => module.default)}
3032
loading={<div>Loading..</div>}
@@ -33,6 +35,7 @@ export default function App() {
3335
someProp2, // `someProp1` and `someProp2` are transfered to `module.dedault` above finally
3436
}}
3537
/>
38+
</BrowserRouter>
3639
)
3740
}
3841
```

0 commit comments

Comments
 (0)