Next.js Is Confusing - Is This Server or Client Code?

  Рет қаралды 2,798

Sam Meech-Ward

Sam Meech-Ward

7 ай бұрын

Next.js server components and server actions make things easier when they work, but when things go wrong, it seems impossible to debug. Here's some advice to help you navigate next.js server and client interactions.
My Website: www.sammeechward.com
Twitter: / meech_ward
TikTok: / meech.s.ward
Github: github.com/orgs/Sam-Meech-Ward
Instagram: / meech_ward

Пікірлер: 19
@johnnycoding1423
@johnnycoding1423 7 ай бұрын
Nice introduction! the 'server-only' library is also used in Nextjs itself.
@SamMeechWard
@SamMeechWard 7 ай бұрын
I feel like there should be a better solution, but it's better than nothing
@shecodes94623
@shecodes94623 7 ай бұрын
Sir, the quality of your videos are awesome and the explanations are simple Thanks for the quality content😊
@7doors847
@7doors847 7 ай бұрын
This is a great example of the “best and worst things” about Next.js Btw, hope you still keep that Telecaster around Sam 😉 Cheers and thanks for the awesome content!
@abdullahisalihu8107
@abdullahisalihu8107 7 ай бұрын
Had this same issue some days back, I was so upset that I deleted the entire code and started over 😢 Thanks man
@SamMeechWard
@SamMeechWard 7 ай бұрын
Thats not the first time i've heard of someone doing that this week
@zunnoorainrafi5985
@zunnoorainrafi5985 7 ай бұрын
What's your thoughts on Remixjs?
@SamMeechWard
@SamMeechWard 7 ай бұрын
It's great! I also like using React on it's own for SPAs. They're all great and all come with their own upsides and downsides and confusions. You just gotta make sure you're really competent with at least one so you can actually build a full app when you need to.
@regex679
@regex679 7 ай бұрын
bro your moustache is fire 🔥
@SamMeechWard
@SamMeechWard 7 ай бұрын
Thank you 🤗
@softdevstuff1008
@softdevstuff1008 6 ай бұрын
so basically, dependency injection is the only way for all client components.
@muradqumizakis8428
@muradqumizakis8428 7 ай бұрын
I thought you don’t need to add “use server” as that’s the default ?! 4:25
@SamMeechWard
@SamMeechWard 7 ай бұрын
you need to add it to server actions. Also, remember that if you import anything into a client component, it becomes client by default.
@Anas_Alaqeel
@Anas_Alaqeel 7 ай бұрын
Bruh, just move to Qwik, you just write normal react and everything will render on the server with no worries about what will render on the server and what will render on client. Qwik is more developer friendly, way faster… its just Qwik!
@ray-lee
@ray-lee 7 ай бұрын
5:38 this has been fixed already in 14.0.3
@SamMeechWard
@SamMeechWard 7 ай бұрын
I installed the latest versions of everything before shooting the video and there’s definitely still issues when you don’t host with vercel. Might be a system issue or something else.
@xxXAsuraXxx
@xxXAsuraXxx 7 ай бұрын
thats why I use Angular v17!
@user-xk8fx5bg8c
@user-xk8fx5bg8c 2 ай бұрын
it's seriously very confusing... i cannot use useState on both server and client components.. i cannot even distinguish which one is which.. react is so garbage
@Sooraj-Rao6
@Sooraj-Rao6 Ай бұрын
Not react, but next js
React Proxy | Easiest Fix to CORS Errors
15:52
Sam Meech-Ward
Рет қаралды 82 М.
Do you REALLY need SSR?
18:15
Theo - t3․gg
Рет қаралды 163 М.
Alex hid in the closet #shorts
00:14
Mihdens
Рет қаралды 10 МЛН
Heartwarming Unity at School Event #shorts
00:19
Fabiosa Stories
Рет қаралды 18 МЛН
10 common mistakes with the Next.js App Router
20:37
Vercel
Рет қаралды 195 М.
DiagramGPT - Honest Review of Eraser AI
8:22
Sam Meech-Ward
Рет қаралды 119 М.
Storing Images in S3 from Node Server
39:59
Sam Meech-Ward
Рет қаралды 85 М.
Svelte 5's Secret Weapon: Classes + Context
18:14
Huntabyte
Рет қаралды 13 М.
My Problem with Next.js Server Actions
10:13
James Q Quick
Рет қаралды 16 М.
Reflecting on React Server Components
26:33
Theo - t3․gg
Рет қаралды 44 М.
Are React Server Components Really Slower?
13:47
Jack Herrington
Рет қаралды 27 М.
How To Use Next.js 14 Server Actions
21:06
Brett Westwood - Software Engineer
Рет қаралды 24 М.
Todos os modelos de smartphone
0:20
Spider Slack
Рет қаралды 59 МЛН
Отдых для геймера? 😮‍💨 Hiper Engine B50
1:00
Вэйми
Рет қаралды 1,3 МЛН
$1 vs $100,000 Slow Motion Camera!
0:44
Hafu Go
Рет қаралды 26 МЛН
Лазер против камеры смартфона
1:01
NEWTONLABS
Рет қаралды 398 М.