Back

[SOLVED] Server data wont load before page

  • 0
  • Web
bonndubz
21 Nov, 2023, 10:56

i have an issue now, it seems the user database doesn't access all images like profiles and badges before the page loads and that gives me uncontrolled undefined errors which makes the page really unstable what should i do?

TL;DR
The server data is not loading before the page, causing undefined errors and instability. The user is using the vite-react framework. The solution is to use a loader or data checker. The user fixed the previous issue by using a weird piece of code. However, there is now an issue where the user database is not accessing all images before the page loads, resulting in undefined errors. The solution to this new issue is not mentioned in the thread.
bonndubz
21 Nov, 2023, 11:30

well i fixed it with a really weird piece of code that works properly for some reason

bonndubz
21 Nov, 2023, 11:30

it only renders Home component when the users database is more than 0

Guille
21 Nov, 2023, 12:00

That is a normal behavior, I don't which framework are you using, but you have to considerate requests are not made all together, and not all request finish to load at the same time, that is why you'll get undefined values at some renders. To solve that, you normally use a loader, or a data checker as you already did it

bonndubz
21 Nov, 2023, 12:08

yeah yeah no worries

bonndubz
21 Nov, 2023, 12:08

im using uhh

bonndubz
21 Nov, 2023, 12:08

vite-react

Guille
21 Nov, 2023, 12:32

[SOLVED] Server data wont load before page

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more