HUGE_DICK_10_INCHES's avatar

When to use nuxtserverinit

I have schools page where I have 1500 schools that probably never change.

I want to on each school pages open, make request to api to check is school table updated. If it is I would change data within store and local storage and cookies.

I tried using asyncData() {} that needs to have return, but I am not returning any data but updating state if versions are not the same.

I looked up for nuxtserverinit but I am not sure how it works and when to use it?

Is there a better solution for this?

0 likes
0 replies

Please or to participate in this conversation.