DO NOT Use Hooks in Next.js?? | Josh Reacts

DO NOT Use Hooks in Next.js?? | Josh Reacts

Josh tried coding

11 месяцев назад

23,131 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Josh tried coding
Josh tried coding - 03.09.2023 20:00

my sincere condolences for the small editing mistake lol

Ответить
test test
test test - 12.10.2023 05:44

If the devs would actually care about the performance they wouldn't use react in the first place

Ответить
Shubham Nanaware
Shubham Nanaware - 21.09.2023 16:47

Hi I am using next js 13 app deployed on amplify aws but it gives me html chunks code after some time please tell me any solution.

Ответить
Rudra Pratap singh
Rudra Pratap singh - 10.09.2023 19:04

can u make a project using T3 stack plz , it been a while that u have uploaded a detailed project video .

Ответить
Karim Ben
Karim Ben - 09.09.2023 16:07

NextJS is becoming trash since the app router trust me, i faced a loooot of bugs and weird issues that are nowhere to be found in the nextjs/react community

Ответить
Movie Time
Movie Time - 09.09.2023 12:08

that Nokia is 2000 mister

Ответить
Mr Stabil
Mr Stabil - 08.09.2023 16:39

Gonna switch to php at this point

Ответить
Eugene Maestrado
Eugene Maestrado - 07.09.2023 09:22

those are possible with qwik

Ответить
SUKRIT SAHA
SUKRIT SAHA - 06.09.2023 19:24

Both client and server components are important as they both have a role to play.

Ответить
Rob Gioeli
Rob Gioeli - 05.09.2023 23:25

These whole web framework companies and communities need to chill. A $50 android device can handle downloading code just fine. I bought one just to see what the low-end models were experiencing. Everyone is trying to get .001 second increases and speaking to others as if they need to rethink how they do things. The experience for users is not a problem. People need to put time into thinking why they have 0 users using their apps before they keep switching their toolkit.

Ответить
George Gunnee
George Gunnee - 05.09.2023 19:32

Wasn't how it was before it moved to client data handling? Now, we going back to server and then we move back to client once again... @marufbepary100 seem to have right idea or are we talking about an even better way?!

Ответить
Aadam Ishmael
Aadam Ishmael - 05.09.2023 09:55

Ummm, one word. Astro

Ответить
james nelson
james nelson - 05.09.2023 09:22

U guys should just say use php instead. Wth! 10yrs time you will change scope again... really crazy

Ответить
Punkweb
Punkweb - 04.09.2023 20:46

Why don't you guys just learn htmx and stop with this nonsense? It's honestly getting ridiculous the amount of mental gymnastics you guys have to do to defend react at this point.

Ответить
Booi
Booi - 04.09.2023 19:21

Tell the article writer to use PHP or something else.

Ответить
M27Lab
M27Lab - 04.09.2023 18:53

🎉 I like client components

Ответить
JohnDoe1234
JohnDoe1234 - 04.09.2023 17:49

ReactJs was really not designed for this whole SSR... I am moving to SvelteKit

Ответить
Maruf Bepary
Maruf Bepary - 04.09.2023 17:10

I tend to say make every page a server component and then you can use client components inside of that page. That way you can do all the fetching directly from the server and then pass it down to the client components without creating APIs. If you can use server component then you should but client components are still needed.

Ответить
Harshal Hirve
Harshal Hirve - 04.09.2023 16:35

Now there is more confusion😢

Ответить
George Petroff
George Petroff - 04.09.2023 15:48

Hey Josh, awesome video as always, about the topic, as I am also working mainly with NextJS (still preferring the versions prior 13) I have started doing few hobby projects on the latest version, and what I am experiencing is hard times. In my honest opinion Vercel's team have to think about making something in-between(client and server), like state management can't be avoided everywhere and so I guess version 13 contributed not that much as caused frustration and negative impact, however think that within short period of time we will have best of both worlds of React and PHP. Anyways, keep up the good work!

Ответить
Dan K
Dan K - 04.09.2023 14:19

Yeah this article is crazy (and I imagine just clickbait to get a reaction out of people).

React was literally invented to create dynamic, responsive, interactive user interfaces - which you can only do on the client. That's like trying to build a mobile app but not wanting to put any of the code on the users phone.

Next.js does a good job allowing us to do SSR / incremental regen, fetching data on page requests etc but if you actually want your web app/site to do anything dynamic you will always need client side code (stateful logic etc). I'd argue if you're not doing anything dynamic then you don't need to be using React in the first place (except for a nicer dev experience maybe).

I understand the benefit of only shipping the necessary clientside code vs shipping all application code by using server only components, but this article seems to suggest no clientside code which I really don't understand 🤷‍♂

Ответить
Goofer
Goofer - 04.09.2023 14:04

If we ditch client components entirely, we might as well switch to php. At least caching will be manageable.

Ответить
Arun Kumar
Arun Kumar - 04.09.2023 13:42

bro please attach the article link.

Ответить
Merveille van Eck
Merveille van Eck - 04.09.2023 13:04

this take of the balance between server and client architecture is 100% correct. we simply cant default to client only or server only. this isnt 2014 anymore. code splitting is easier than ever, and we should use it to our advantage. P.S.: using TRPC + react query on the server AND on the client has been the easiest way to build performant web apps that ive seen to date. and it even covers use cases for scalability that allow you to migrate your TRPC routes to a separate BE over time and use TRPC as a proxy....so this whole no-client-side argument is honestly just total react hating garbage.

Ответить
abstrusej
abstrusej - 04.09.2023 10:18

Why is everyone so against code running on the client? Client devices are so capable in 2023

Ответить
Noext
Noext - 04.09.2023 09:58

so this article said we must go back to php ? good

Ответить
Sipuli
Sipuli - 04.09.2023 09:15

Hej Josh 👋 I am just dreaming here but that would be awesome a recorded hour talk (podcast?) with the author of the reddit post, where both of you would confront your ideas and discuss that topic and claims <3. Danke schön for the video!

Ответить
Dante
Dante - 04.09.2023 08:27

Everyone is talking about the "render on server === faster app" advantage but noone is talking about the cost of processing all that rendering.
With "normal" React app, the clients actually do all the processing, so we don't need to care too much about scalability/performance optimization on the server side.
But with server side rendering... let's just say that you should prepare for a (much) bigger Vercel/AWS bill at the end of the month in comparison to client side React app, not to mention the cost of hiring a Primagen to help you optimize all your infra
.
Moreover, we've been using Client Side React for years and now someone is still bringing up the "what if client uses an old device?" argument, I mean really? Just use Astro or PHP + HTMX bro

Ответить
Enver Seçilmiş
Enver Seçilmiş - 04.09.2023 08:23

Idk man, using nextjs for a website that is mostly server rendered and has bunch of interactivity sprinkled in sounds ridiculous to me since there are much better alternatives for that. But that's what nextjs developers are pushing for. I just want my highly interactive web app to be able to show itself quickly on the browser and also have good SEO. That's all I want from nextjs.

Ответить
Sammysapphire
Sammysapphire - 04.09.2023 07:06

Server sided components are incredibly overrated

Ответить
JS DOPE
JS DOPE - 04.09.2023 07:04

planning to move back to good old PHP. damn..they don't give me sh*t.

Ответить
JS DOPE
JS DOPE - 04.09.2023 07:01

my grandpa said..php lives.

Ответить
Deadeye
Deadeye - 04.09.2023 06:12

Should we just use Astro?

Ответить
Dot T.
Dot T. - 04.09.2023 06:02

Like it or not, he is right, i love the new nextjs 13 app directory

Ответить
Qurashi
Qurashi - 04.09.2023 05:37

Nextjs gives us best of both worlds, Server + client ✓✓✓

Ответить
Qurashi
Qurashi - 04.09.2023 05:05

No no bro, I don't agree that. That is a feature not an issue. I have been depending on that for lots of my projects, I might need to change whole stuff if Nextjs does something (which removes that caching behaviour).

If you need any of your pages not to be cached please use <a> tag instead of <Link>...✓✓

Ответить
Khawaja Showzib
Khawaja Showzib - 04.09.2023 05:02

Bro kindly make a video on how to handle delay in loading ui whenever the page reloades in next 13 it was so horrible the entire layout of the website is shifting on page reload

Ответить
Liran
Liran - 04.09.2023 03:20

There is a reason it’s called React .

Ответить
Function - previously known as waffeln
Function - previously known as waffeln - 04.09.2023 03:09

josh finally swallowing the CSR pill? didn't think i'd live to see the day.

Ответить
Filip Niklas
Filip Niklas - 04.09.2023 03:08

I don't get it. Isn't the best of all worlds that we get fine-grained control to use server and client as it best fits the use case?

Also, re client components vs server: sure, the client has to download a bunch of javascript files but the entire process isn't just downloading but processing and rendering data. Let's say you have charts you need to display based on data; isn't it very inefficient to have the server process and render for every client those graphs when it can just ship the raw data and "instructions to make the graph" (javascript files) to the client so that computing power gets off-loaded to the client's device and the server only has to worry about sending the plain data?

Ответить
Drew
Drew - 04.09.2023 02:34

Yeah I'm going back to intercoolerjs I mean htmx and php you all have fun...

Ответить
Sujeet
Sujeet - 04.09.2023 01:40

When i stop and think about it, i can't even remember if i've ever written a component without `useState` or `useEffect` or `useMemo` or 'onClick` ... i really don't understand the point of RSCs.

Ответить
Festusyuma
Festusyuma - 04.09.2023 01:36

Purely client side is not fun, Purely server side is also not fun, A good mixture of both and knowing when to use which is where it gets very good

Ответить
Jelly fish
Jelly fish - 04.09.2023 01:24

Worst clickbait video.lame man

Ответить
Ipicon
Ipicon - 04.09.2023 00:59

big Josh W, no more words are needed

Ответить
succatash the learner
succatash the learner - 04.09.2023 00:00

Deno

Ответить
Mert D
Mert D - 03.09.2023 23:55

Sorry but that argument makes zero sense. Server side components are pretty useful for fetching and static sections of the page (header, footer or even certain static sections of a page). Otherwise, client side components are all the way. If someone wants to ditch client side and use server-side excessively, he should ditch nextjs entirely and use Astro, node+express or even php.

Ответить
Hawar Hekmat
Hawar Hekmat - 03.09.2023 23:48

Maybe when server actions become stable, a lot may change.but even server actions has a client hook 😂😂

Ответить
Muhammad Harun Al Rasyid
Muhammad Harun Al Rasyid - 03.09.2023 23:33

Hey Josh, You are building your SaaS in app dir with all use client thing 😂 or going back to OG pages?

Ответить