Пропустить навигацию
React Server Components have gotten a lot of hate recently.
0:00 / 1:22

React Server Components have gotten a lot of hate recently.

Cory House

@housecor148 тыс. подписчиков

Открыть в X
341 отметка «Нравится»СкачатьОригинальный пост

34 254 просмотра

React Server Components have gotten a lot of hate recently. I'm not saying they're perfect, but this short comparison shows why I still think they're compelling.

12 комментариев

Комментарии из оригинального поста в X (Twitter)

  • Фото профиля Cory House

    @housecor

    Some replies said a comparison with React Query would be more “fair”. I agree. React Query is 🔥. But it’s not React. It’s one of many third-party libraries. RSC vs useEffect is me comparing old React to new React.

    18 отметок «Нравится»

  • Фото профиля Soccer Bot™

    @soccerbottm

    Experience the bot completely reimagined. 🌟 A completely new design, reminders for match prediction, notifications when games are interrupted, continued or postponed. New commands like /features and /standings and new languages and much more.

    427 отметок «Нравится»

  • Фото профиля Drew Hamlett

    @drewhamlett

    Was this supposed to be for April 1st? Now do it with React query, or show the suspense boundary/error component you need for the error and loading state.

    13 отметок «Нравится»

  • Фото профиля Cory House

    @housecor

    I discuss both in the video, and explain why they're not in this file. Also, your tone is lousy. Be kind.

    11 отметок «Нравится»

  • Фото профиля Tanguy Krotoff

    @tkrotoff

    You are missing the main advantage: you don't need to code a backend when using RSC. With client components, getPies() needs to perform an HTTP call to an API. With RSC, getPies() can directly call the database.

    11 отметок «Нравится»

  • Фото профиля Cory House

    @housecor

    Great point - I should have mentioned

    4 отметки «Нравится»

  • Фото профиля David Arteaga

    @_davidarteaga

    it feels a bit artificial to use an intentionally verbose example ignoring extremely common solutions like react-query RSC solve different issues I think this actually turns people away from trying them because the first thought is going to be: react query solves this

    6 отметок «Нравится»

  • Фото профиля Cory House

    @housecor

    It’s not intentionally verbose. It’s old React vs new React. React Query is not part of React, and not necessarily something one is using. That said, I agree React Query resolves many issues.

    2 отметки «Нравится»

  • Фото профиля Gnar Enjoyer

    @Carnivore_MTB

    No one is fetching data in a useEffect like that in real projects. This is a disingenuous example.

    3 отметки «Нравится»

  • Фото профиля Cory House

    @housecor

    I literally audited an app today doing just this. As someone who reads a lot of real code it’s still unfortunately common

    1 отметка «Нравится»

  • Фото профиля Sakil Sazzad Joy

    @one_sss

    I don't think people hate server components. They hate the way nextjs introduced it and butchered the whole experience with caching. React server components solve a loooot more than just data fetching!

    3 отметки «Нравится»

  • Фото профиля Cory House

    @housecor

    That's fair. I'm eager to see other mature implementations

    3 отметки «Нравится»