Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skeleton screen loading management #33

Open
Criminal-sudo opened this issue Jan 20, 2020 · 0 comments
Open

Skeleton screen loading management #33

Criminal-sudo opened this issue Jan 20, 2020 · 0 comments

Comments

@Criminal-sudo
Copy link

I was also writing a Skeleton screen and encountered a problem.
After reading your code, my confusion is even greater. The skeleton screen needs a loading boolean value to determine whether to render. There will be many pages in a project, and a loading boolean needs to be bound to each page. This is a repeated declaration of loading. boolean.
There is another situation: there will be many AJax requests on a page, and each request will be a separate module on the page, and a separate module is a skeletal screen, which will cause more repeated work of declaring laoding boolean Therefore, all AJax requests for the page are placed in Promise.all. After all requests are successful, the page is displayed normally, otherwise the skeleton screen is displayed.
This is my doubt now, I don't want to repeatedly declare the loading boolean, so I don't know if you have a better solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant