Hi Guys, I'm using createBrowserRouter, however i'm having some issues with the loaders. In one of the loaders, I require a refresh token that I'm storing with redux. This is fine and all, however I'm using redux-persist, and it means that even after using a PersistGate component to rehydrate my redux state, the loaders in the createBrowserRouter have already loaded, meaning the states are null. What can I do about this?
<Provider store={store}>
<PersistGate
onBeforeLift={async () => {
await delay(5000)
}}
persistor={persistor}
loading={null}>
<RouterProvider router={router}/> //the createBrowserRouter
</PersistGate>
</Provider>