Closed GMSoudersJr closed 5 months ago
The latest commit is my failed attempt at displaying a loading indicator.
I tried both getStaticProps
and getServerSideProps
. Both did the same thing as far as I could tell. I must have implemented something wrong.
could you try the following?
getStaticProps
yarn build
yarn start
do you still see a loading? it should be instant now
Thanks for the feedback.
<p>Loading...</p>
does not show.How often do we want the member list to update?
However, if the spreadsheet is changed, the website does not get the updated information. ?
You are correct
IngetServerSideProps
the fetch of the members blocks the rendering of page until that call is done, that's why suspense didn't work.
It looks like we have a couple of options
Use getStaticProps
. There is a revalidate
option for getStaticProps but I am not sure if it works in fly.io. In the worst case scenario we would have redeploy often, maybe every Sunday?
Move the loading logic to _app.tsx
and do something similar to this. I am not a big fan of this.
Move the member fetching logic to the client side (Members Page Component) and use something like react query or just plain fetch.
So when would Suspense actually work? I'm confused.
worst case scenario, we would have to redeploy often...
- I tested
revalidate
with a short interval on a local build and it worked fine
Does fly.io stop revalidation? How does the homepage stay current?
let's do option 1 then
Does fly.io stop revalidation?
I am not sure, I can't find any sources stating that it does or it doesn't. I think we can just test it.
How does the homepage stay current?
It's using getServerSideProps
getServerSideProps
that's right. 바보야! I knew that
I shared the Google Sheet with you
Cool, I'll review this later today, we don't need the loading component anymore right?
Loading removed
Thanks. And thanks for the feedback
Centered Content
Consistent Font-Size