Commit 1242da81 by Wee

docs(README): update README

parent 12ef6cd4
......@@ -93,6 +93,25 @@ This hook will be triggered when LiveRoute will hide in `componentWillReceivePro
This hook will be triggered when LiveRoute will reappear from hide in `componentWillReceiveProps` stage (so it happens before re-render).
```js
import LiveRoute from 'react-live-route'
<LiveRoute
path="/items"
component={List}
livePath="/item/:id"
name="items"
onHide={routeState => {
console.log('[on hide]')
console.log(routeState)
}}
onReappear={routeState => {
console.log('[on reappear]')
console.log(routeState)
}}
/>
```
## TODO
- [ ] add test case
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -48,5 +48,5 @@ if ('scrollRestoration' in window.history) {
}
document.addEventListener('scrollTo', () => {
console.log('233')
console.log('document scrolled')
})
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment