Replies: 1 comment 1 reply
-
I would use getStaticProps() to generate the page when the Author first posts something with the help of the fallback prop, and then load the posts in on the client side. In the future you can use #11552 and specify a revalidate intervall and further down the road trigger a manual rebuild of the specific site whenever a user adds a new post or someone likes a post, but in every way you still need to fetch new data client side, in case there is a new post while a user has the site open. You could use something like Pusher Channels aka. Websockets to have a realtime forum or use SWR or React-Query with a refetch intervall. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Which should I choose for a forum like page where
the Author first posts something
and there will be posts below that by anonymous
and posts are ranked by likes,
the most liked post comes at the top.
I doubt if I go with Static the functions will be limited and each post might require page reload..
I don't want to compromise performance.
Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions