File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 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
124124 */
125125export function UIRouter ( props : UIRouterProps ) {
126126 const uiRouter = useRef < UIRouterReact > ( ) ;
127- const [ _hasStarted , start ] = useState < boolean > ( false ) ;
127+ const [ started , setStarted ] = useState < boolean > ( false ) ;
128128
129129 useEffect ( ( ) => {
130- // Router hasn't been initialised yet, this is the first render
131130 if ( ! uiRouter . current ) {
131+ // Router hasn't been initialised yet, this is the first render
132132 const { config, states, plugins, router } = props ;
133133 if ( router ) {
134134 uiRouter . current = router ;
@@ -144,9 +144,9 @@ export function UIRouter(props: UIRouterProps) {
144144 }
145145
146146 uiRouter . current . start ( ) ;
147- start ( true ) ;
147+ setStarted ( true ) ;
148148 }
149- } ) ;
149+ } , [ ] ) ;
150150
151151 return uiRouter . current ? (
152152 < UIRouterContext . Provider value = { uiRouter . current } > { props . children } </ UIRouterContext . Provider >
You can’t perform that action at this time.
0 commit comments