File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -124,11 +124,11 @@ export const InstanceOrPluginsMissingError = `Router instance or plugins missing
124
124
*/
125
125
export function UIRouter ( props : UIRouterProps ) {
126
126
const uiRouter = useRef < UIRouterReact > ( ) ;
127
- const [ _hasStarted , start ] = useState < boolean > ( false ) ;
127
+ const [ started , setStarted ] = useState < boolean > ( false ) ;
128
128
129
129
useEffect ( ( ) => {
130
- // Router hasn't been initialised yet, this is the first render
131
130
if ( ! uiRouter . current ) {
131
+ // Router hasn't been initialised yet, this is the first render
132
132
const { config, states, plugins, router } = props ;
133
133
if ( router ) {
134
134
uiRouter . current = router ;
@@ -144,9 +144,9 @@ export function UIRouter(props: UIRouterProps) {
144
144
}
145
145
146
146
uiRouter . current . start ( ) ;
147
- start ( true ) ;
147
+ setStarted ( true ) ;
148
148
}
149
- } ) ;
149
+ } , [ ] ) ;
150
150
151
151
return uiRouter . current ? (
152
152
< UIRouterContext . Provider value = { uiRouter . current } > { props . children } </ UIRouterContext . Provider >
You can’t perform that action at this time.
0 commit comments