tisn.app
tisn.app copied to clipboard
Manage the loading status better.
Right now there are some issues with how the loading status of components with multiple hooks is handled, as when the first hook finishes it will update the state and the user will be misleaded to think that all loading has ended when in fact that's not the case. Instead of using a single boolean to manage the loading status, it would be better to have an object of booleans to manage the loading status of each hook and use that to determine if all loading has ended or not.
Investigate if instead of using an object is better to use a set for this.
May I know which page is this being affected?
Hi @idiglove! 👋 Thanks for your interest on this issue!
There are multiple pages being affected by this, it probably happens on any page using multiple useEffect
hooks. You can see one example in the Chat
component. If you want to work on this issue, I could help you make a list of which components need to be fixed, or anything you need really 😊
@AlbertoPdRF Loading seems fine to me. I have also sent big messages through chats. How can I replicate this issue?
To try and see the issue more clearly, you could set timeouts on the different useEffect
hooks and see how the loading bar disappears even when the application is still loading some stuff. Feel free to ping me on Slack if you want me to take a look to this with you!