https://remoteindian.com/ logo
#random
Title
# random
l

lively-kitchen-45586

07/09/2020, 3:18 AM
The most satisfying thing I did today was to remove all those 
if (isLoading) { <LoadingSkeletons/> }
 from the public pages of my side project app. There's tremendous performance gains to be had by pre-rendering pages (and treating the pre-render as a skeleton), and then fetching for fresh data with SWR after load if necessary. Thesis: https://twitter.com/sarupbanskota/status/1281054466628673536 Solution: https://twitter.com/sarupbanskota/status/1281057252225323010
l

loud-glass-33663

07/09/2020, 3:46 AM
What are you using? Ok. Looked at your tweet! 😊
Haven’t used Next as yet - but does the pre-rendering depend on a specific backend stack that you are using to serve the data?
l

lively-kitchen-45586

07/09/2020, 3:57 AM
Not sure if I understood your question correctly @loud-glass-33663 — what's an example of backend stack? Do you mean backend = like Rails, or more something like Firebase or a REST API?
l

loud-glass-33663

07/09/2020, 3:59 AM
Sorry. I meant do you need to be running node or something like that or can I be running python, .Net or any other API engine to power the app? I am guessing Next.js is a front end framework only? Like React / Angular / Vue?
l

lively-kitchen-45586

07/09/2020, 4:04 AM
Next.js is a hybrid — you could be running it as purely static (frontend/SSG), full-stack (i.e SSR), or hybrid (iSSG). If you have a static frontend with Next.js, you can activate what I described, in an API-agnostic manner. So your API could be .Net-powered and you get the benefits of the approach I described. But if your entire product is a monolith (e.g a Rails monolith where you have templates), then Next.js isn't very useful. In theory you can still get the results of the approach I described using other "full-stacks", but I don't know of any other framework that has an idiomatic approach to achieve this. I hope this makes sense!
👍 1
l

loud-glass-33663

07/09/2020, 4:10 AM
Yep it does. The API-agnostic thing is what I was looking at. Personally, I am not too fond of JS based backend systems - so this would definitely work in my case the next time I need a front end framework.
approved 1