I've been using react for quite a while now but for some reason I didn't really have time for SSR but I recently was taking Stephan Grider's SSR course and... I absolutely hate it, a lot of things seems unclear or unreasonable.
So my question is is it even worth it? How much faster SSR is? And what else but load time SSR is good for?
Cheers 👋👋
I had exactly the same experience, took a Universal React course egghead and didn't really understand what was going on behind the API, it all just felt hacky and confusing to me.
Whether it's worth it depends on what you're using it for. If you're building a project that's not just for learning then I would say forget it, it's not worth the headache IMO, and because the best practices and popular libraries around these things change a lot, the headache will likely be ongoing.
They say it could be much better for seo tho, I may have to check nextjs as Steven said.
This comment was deleted 2 years ago
For 99% of indies, I'd say a full-blown front-end framework is not worth it on content pages. If you've got an actual app with a complex UI an many moving parts, use a FEF for that and render everything else from the back-end.
Stripe, Coinbase and so many other companies just used Rails or something even simpler until they were making money. Ditto for NomadList (very janky PHP written by @levelsio while he was learning to code), and many, many other sites that started with basically just WP and plugins.
Looking at their successes, I realized in retrospect that my experience of working at a huge successful tech company had made my focus too narrow. They were paying me and two others on my team to work full-time on making a beautiful front end. That's because they did billions in revenue per year and could afford to do that while simultaneously paying marketers, back-end engineers, data scientists, and a staff of thousands of sales reps.
Realizing my resources were limited, I made the original page for my current business in an online Markdown editor and just tossed in a static folder on my server. After I had people emailing me and asking how to pay for more content, I made a very simple backend MVC framework. I have written almost no JS whatsoever (though of course the Stripe payment widget is included) and it's earning me hundreds of USD per week.
I could have just hosted it on WordPress to get this far! Over time, it will be worth it to invest more and more on all parts, (probably starting with marketing tools, then tools to speed up content production and then doing or even hiring someone to do more work on the front-end).
That's totally right.
I've been using Gatsby and it's great: https://www.gatsbyjs.org/
This comment was deleted 3 years ago
next.js is the most far along if your wanting to stay using react
Load time is better, but the main reason is SEO. Google is good at parsing client-side JavaScript but nothing beats server-side rendered content.
NextJS is an interesting project designed for making server-side React a lot easier to write. https://github.com/zeit/next.js
Do you recommend a course or something for Next?
Hmm, I'm not aware of any personally. I learned the library just by following their Getting Started guide and playing around.
This comment was deleted 2 years ago
This comment was deleted 2 years ago
Thanks! :)
This comment was deleted 4 years ago
That was a great answer, thanks!