How Next.js is delivering React’s vision for the future (Sam Selikoff)

  Рет қаралды 15,040

Vercel

Vercel

7 ай бұрын

Presented at Next.js Conf 2023.
View all talks from the conference: • Next.js Conf 2023 - In...
Explore templates of sites built with Next.js: vercel.fyi/verceltemplates
Check out the Vercel product tour: vercel.fyi/producttour
Server Components have brought React closer to fulfilling its mission of giving developers a unified paradigm for building rich user interfaces. This talk will explain how RSC, which started out as the official answer for how to fetch data in React, led to an evolution of the React paradigm that brings the composability of components across the network boundary. We’ll first look at how RSC in Next.js improves upon the previous generation of data-fetching solutions (like getServerSideProps and SWR), why RSC is about so much more than data fetching, and end with an exploration of how this new paradigm will make even the non-UI parts of our applications easier to build in the future.

Пікірлер: 33
@jordantan888
@jordantan888 7 ай бұрын
this is the best argument so far
@dawid_dahl
@dawid_dahl 7 ай бұрын
Loved this presentation; just what I needed amidst all these new and shiny updates to build a mental model.
@rockNbrain
@rockNbrain 7 ай бұрын
great talk!!
@voinbobar
@voinbobar 3 ай бұрын
Sam delivering the best presentation as usual!
@zalodias
@zalodias 7 ай бұрын
Love the new paradigm. But would really prefer defining server/client components at the filename level: e.g. Modal.client.tsx, NewsStory.server.tsx. "use" string directives just feel out of sync on how we write JavaScript
@viniciusataidedealbuquerqu2837
@viniciusataidedealbuquerqu2837 7 ай бұрын
it doesn't make it totally server because you can attach js events on the components that makes them "universal" so there should be signals to make it fn level. but I agree that sensible defaults are the way to go
@dinuka
@dinuka 6 ай бұрын
Nice presentation
@benme1386
@benme1386 6 ай бұрын
Can you unit test React Server Components, or would they only be tested via E2E tests? It's easy to test client components based on useSWR, because I can mount the component and mock out its network API calls to create any scenario my test needs.
@bosung90
@bosung90 6 ай бұрын
Love your talk. We used to have allergic reactions from people seeing html inside js, and css inside js, not anymore. I always tell people stop breaking code up by their types, but their functionality. Nobody writes button without styles, and nobody writes button without its corresponding js or form actions. If then, why are we breaking up the code into different files? That is a code smell and its called fragmentation. If we have a button that adds todo list (handled on the server), this button is useless without server action, then why not put them together in the same component? The only reason why we didn't do it before was because there just wasn't a good way to do it.
@jmula1963
@jmula1963 7 ай бұрын
can we get the github repo link?
@janstrnadek1441
@janstrnadek1441 6 ай бұрын
Looks like "good" old PHP :) let's mix SQL and HTML together... The presentation looks good, and the new tutorial too... But my feelings are quite contradictory until I've tested that by myself. Especially I am curious about some complex applications and how this thing will be tested.
@DivjotSingh
@DivjotSingh 7 ай бұрын
I wonder about security implications of third party packages. What if a from npm has a formAction in it that steals my server creds/data. How would I even track it and stop such an attack?
@VercelHQ
@VercelHQ 7 ай бұрын
nextjs.org/blog/security-nextjs-server-components-actions
@DivjotSingh
@DivjotSingh 7 ай бұрын
@@VercelHQ thanks. However this only let's you protect your own server actions and components. How can I stop a random from npm performing certain server actions?
@viniciusataidedealbuquerqu2837
@viniciusataidedealbuquerqu2837 7 ай бұрын
@@DivjotSingh I think if you taint your creds it shouldn't creep out but no one's stopping from leaking non tainted data
@jpkiser5051
@jpkiser5051 7 ай бұрын
What is preventing you from downloading a normal NPM package that steals your creds today? I dont think server actions leave you anymore exposed to supply chain attacks.
@DivjotSingh
@DivjotSingh 7 ай бұрын
​​@@jpkiser5051 I completely agree. Even today I can import a design system component and SSR it and end up running third party code during the server pass. I guess I'm feeling bit nervous/lack of control over what a third party component can end up doing without my knowledge. If components can contain both server and client code, it makes them even more powerful than before for attacks as well Maybe Next can add an opt-in system where we can allow formAction or action on form components only for selected npm packages.
@alansaldivares
@alansaldivares 6 ай бұрын
They guy at the bottom right was watching memes 👀
@viniciusataidedealbuquerqu2837
@viniciusataidedealbuquerqu2837 7 ай бұрын
I understand the sentiment but couldnt we make formAction "use server" by default? seems like too much to write again "use server" inside a server component
@TheTmLev
@TheTmLev 7 ай бұрын
Form action doesn't have to be inside a server component, it could be in client too
@jijieats
@jijieats 6 ай бұрын
it's literally 2 words lmao
@yipansong2688
@yipansong2688 4 ай бұрын
PHP is best language in the word
@hamzadata
@hamzadata 7 ай бұрын
here comes the meme attack
@MahmutGundogdu
@MahmutGundogdu 7 ай бұрын
Yes , after I saw the server component, i though , react is a lego. I feel like a lego owner who press a lego in night. Thanks you killed SoC.
@solarspear27
@solarspear27 7 ай бұрын
First commit -m
@codefinity
@codefinity 6 ай бұрын
15:44 🤯 I have 🫘 using SERVER ACTIONS, but I have 💭 that there 😯 only for from submissions. That is, a ‘’ with a ‘“submit”’ button.
@catalinim4227
@catalinim4227 3 ай бұрын
that's a lot of technology and innovation for a basic to-do spa 😂
@pbritotube
@pbritotube 7 ай бұрын
A glimpse into React's origins: It wasn't designed for data handling or retrieval. Instead, React aimed to refine UI creation with one-way data binding, ensuring a seamless rendering flow. Overengineering is the bane of elegant programming.
@JakeLuden
@JakeLuden 7 ай бұрын
It’s not over-engineering, it’s just 2023. React’s origins solved 2013 problems. Next is helping solve 2023 problems.
@pbritotube
@pbritotube 6 ай бұрын
​@@JakeLuden React was created to simplify UI development. Adding other concerns doesn't improve it, it makes things worse by introducing a bunch of decisions and compromises. The result is easy to predict
@youreale
@youreale 6 ай бұрын
@@JakeLudenThose 'problems' already existed before 2023 but were (intentionally or not) unreachable by the React ecosystem.
Optimizing Third-Party Loading in Next.js (Houssein Djirdeh)
13:51
Next.js Conf Keynote (Next.js 14)
29:02
Vercel
Рет қаралды 49 М.
ONE MORE SUBSCRIBER FOR 6 MILLION!
00:38
Horror Skunx
Рет қаралды 14 МЛН
Cute Barbie Gadget 🥰 #gadgets
01:00
FLIP FLOP Hacks
Рет қаралды 26 МЛН
¡Puaj! No comas piruleta sucia, usa un gadget 😱 #herramienta
00:30
JOON Spanish
Рет қаралды 23 МЛН
Performance in React and Next.js (Lydia Hallie)
16:12
Vercel
Рет қаралды 27 М.
React Roundtable: Server Components, Suspense, and Actions
38:56
10 common mistakes with the Next.js App Router
20:37
Vercel
Рет қаралды 176 М.
The Big Headless CMS Lie (James Mikrut)
18:14
Vercel
Рет қаралды 42 М.
React + Servers = Confusion
20:30
Theo - t3․gg
Рет қаралды 39 М.
Theo Browne: Next.js is a backend framework
11:44
Vercel
Рет қаралды 149 М.
Next.js Explained: Partial Prerendering (What? Why? How?)
11:03
Building Generative UI with Next.js (Jared Palmer)
13:16
So You Think You Know Git - FOSDEM 2024
47:00
GitButler
Рет қаралды 959 М.
AMD больше не конкурент для Intel
0:57
ITMania - Сборка ПК
Рет қаралды 513 М.
iPhone 12 socket cleaning #fixit
0:30
Tamar DB (mt)
Рет қаралды 7 МЛН
Эффект Карбонаро и бумажный телефон
1:01
История одного вокалиста
Рет қаралды 2,6 МЛН