OnUpdate <>
The <OnUpdate>
component will be called whenever the location changes.
A function to be called whenever the location changes. The function will be passed the new location object.
import { OnUpdate } from 'rrc'
<OnUpdate
call={(location) => {
analyticsTool.log(location.pathname)
}} />
A boolean attribute, if true
, the call
prop will be called when the <OnUpdate>
component mounts.
<OnUpdate
immediate
call={(location) => {
analyticsTool.log(location.pathname)
}} />