Тёмный

SSR React with Go vs Next JS 

Coffee Into Code
Подписаться 414
Просмотров 2,9 тыс.
50% 1

I spent the weekend learning how to server side render React using Golang. The outcome is pretty bad & my Go implementation performed very poorly vs NextJS but I learned a lot.
There are a few key optimisations to be made, mainly on esbuild & V8

Опубликовано:

 

21 апр 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 25   
@muneefaltamimi8677
@muneefaltamimi8677 Месяц назад
Bro is inventing a new framework. Let's go. Can't wait to see GoX (Full-stack GO + React) 1.0v (;
@coffeeintocode
@coffeeintocode Месяц назад
Hahahaha thanks a lot! But I highly doubt this would happen. Watch the follow up video if you haven’t. Embedded JS runtimes are not too fun!
@zehankhan801
@zehankhan801 2 месяца назад
nice work🎉
@coffeeintocode
@coffeeintocode 2 месяца назад
Thanks 🔥
@prashlovessamosa
@prashlovessamosa 2 месяца назад
Great explanation
@coffeeintocode
@coffeeintocode 2 месяца назад
Glad you think so! Thanks for the support
@Axorax
@Axorax 2 месяца назад
Cool video 😎👍
@coffeeintocode
@coffeeintocode 2 месяца назад
Thanks so much! A better version is coming soon
@arturfil
@arturfil 2 месяца назад
Got a new sub here! Really cool stuff! Do you have a link to a repo?
@coffeeintocode
@coffeeintocode 2 месяца назад
Thanks so much! A better version is ready, will get a video out asap
@codeconcept
@codeconcept 2 месяца назад
Great idea: I was also wondering if it was possible to replace Node with Go in these SSR scenarios. Thanks. Coffee into Code, but also Video into Subscriber :)
@coffeeintocode
@coffeeintocode 2 месяца назад
Thanks so much! I’ve increased the speed by a lot as well, just need to make a video for it now
@gadgetboyplaysmc
@gadgetboyplaysmc 2 месяца назад
I have a feeling it's possible to just prebundle the JS code and then hopefully have some render function that you can use in Go.
@coffeeintocode
@coffeeintocode 2 месяца назад
That was my theory as well! Managed to get it working a few nights ago. Video update coming soon
@gadgetboyplaysmc
@gadgetboyplaysmc 2 месяца назад
Great! Just subbed. Can't wait!
@redman_plus
@redman_plus 2 месяца назад
In case of props I think you can also cache them and just pull some pre-rendered html out of the hash-map if the props are the same. All of the other optimization ideas also look like the type next.js does, so I think you can make it faster than next.js at the end of the day (mostly because 99% of the javascript will be rendered beforehand and Go is simply faster when serving some data over http, plus you can utilize concurrency to make it serve even more clients simultaneously), but it will basically be a hacky templating engine at this point. Overall, a great video! Wondering if it is possible to make props be computed from backend code (like getting some data from the db) and just be passed as props to the component, turning all this thing into a htmx on steroids type of setup.
@coffeeintocode
@coffeeintocode 2 месяца назад
This is great stuff! I’ll have a look at props as well, interesting way of thinking about it which I hadn’t considered
@izumiosana
@izumiosana Месяц назад
do we need node runtime when using it on production? or its only use pure go?
@coffeeintocode
@coffeeintocode Месяц назад
It’s pure Go :) but take a look at my follow up video. I’ve deployed to production and the results are……not great 😂
@amandeep-wf9im
@amandeep-wf9im 2 месяца назад
Shouldn’t you compare hugo with next.js ?
@coffeeintocode
@coffeeintocode 2 месяца назад
I guess yes…..but that wouldn’t be fun for me 😆
@programmerjowo
@programmerjowo Месяц назад
Nice video. You should just generate Js files on the first run
@coffeeintocode
@coffeeintocode Месяц назад
Yup that’s the plan. I’ve managed to get a nice version working. Hoping to get a video done tomorrow
@programmerjowo
@programmerjowo Месяц назад
@@coffeeintocode great. I'll be waiting 😁
Далее
Do you REALLY need SSR?
18:15
Просмотров 160 тыс.
NextJS VS SvelteKit in 2024...
15:51
Просмотров 10 тыс.
Спасибо Анджилишка, попил😂
00:19
The Truth about Rust/WebAssembly Performance
29:47
Просмотров 173 тыс.
HTMX - What they don't want you to know!
13:28
Просмотров 79 тыс.
Next.js isn't React
17:11
Просмотров 198 тыс.
r/webdev BANS HTMX??
5:28
Просмотров 143 тыс.
Next.js with a separate server - good idea?
22:53
Просмотров 49 тыс.
Intro to Go - Part 1 - HTTP basics with Go 1.22
26:49
Просмотров 1,2 тыс.
Intro to Go for Node.js Developers
50:23
Просмотров 19 тыс.