This is one of our components. We have multiple ro...
# support-questions-legacy
t
This is one of our components. We have multiple routes. My understanding was that in the if (sessionContext.loading === true) { return null; } if we changed the return null to a loader component, then we could display a loader between our routes but we are unable to see anything even when the route takes time to load. Is there a different way to show loaders?
r
hey @tahiatgonicpp_57357 in the screenshot, you are still returninig null.
maybe you sent the wrong screenshot?
t
Yeah, I am returning null here
I changed it back a while ago since it was not working
r
So the session context loading happens fast most of the time. Since it’s just reading from the browser storage.
Maybe the delay you saw is happening due to something else? Not sure
t
Yeah, the delay does not happen most of the time. But since I am running on localhost at the moment, there are times when it is slow. In my experience, running on localhost can be slow sometimes and even then I do not see the loader. Just to confirm, the intended way to add a loader is to return a JSX element for it in place of null?
r
Yes
t
Okay, thanks! Maybe there is something else going on with the loading. I will investigate.