server-components-demo
next-rsc-demo
server-components-demo | next-rsc-demo | |
---|---|---|
11 | 4 | |
4,176 | 505 | |
1.3% | - | |
2.2 | 6.2 | |
28 days ago | about 2 years ago | |
JavaScript | JavaScript | |
MIT License | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
server-components-demo
-
React Server Components Without a Framework
I, along with many ReactJS devs, have been following the development of the "new" React Server Components API with excitement. It solves some common problems in React around data fetching and efficiency in client side applications. If you're interested in learning more about the API I'd recommend you listen to the recent JS Party podcast with Dan Abramov and Joe Savona from the React Team on the future of React, and then check out the React Server Components Demo on GitHub.
-
So, why Server Components?
I borrowed this piece of code from the React Server Components demo Notes application.
-
Harnessing the power of React Server Components + Miro
And perhaps most importantly, one of the biggest limitations of RSC at this time is their out-of-the-box support. Currently, the React team has partnered with Vercel/NextJS to develop some boilerplate functionality within the NextJS structure (still experimental). Note: This boilerplate demo app was developed in the early stages of RSC, and will be replaced by the Layouts RFC going forward.
- React Server Components and Remix
-
Let's make a web application with React Server Components.
See the README for how to install the demo. https://github.com/reactjs/server-components-demo
-
React Futures - Server Components
Let’s use this example of a server component:
-
Should You Care About React Server Components?
For example, as I started to play around with the React team’s Server Components demo, I realized I had to fundamentally change how I approached building components. Instead of just creating a new file and typing export const MyComponent = () => {}, I now had to start thinking about how the component would be used, to help determine whether it was a better fit for the client or the server.
-
What are React Server Components and will you need to use them in the future?
If you want to play around with the demo code for React Server Components, you can find this code on GitHub.
-
An Introduction to React Server Components
As we see in the demo app, the server component is rendered in a special format which can be read by the client. We can see the special format in the below image
-
Yet Another Article About React Server Components
I'm looking forward to trying out React server components (I plan to fork the React team's demo and play with it), but I don't see myself having a heavy use for it in my everyday life. I'm not currently working on any personal projects that require interactivity, and for the projects I'm working on, server-side rendering is probably a better way to reduce my bundle size.
next-rsc-demo
-
React Server Components in Next.js 12
For this tutorial, rather than creating a project from scratch, I’ll be using the Hacker News project created by Vercel to explain how RSC are used in Next.js 12. Repository here.
- React Server Components and Remix
-
How to create React Server Components functionality with SSR or SSG?
Hey! You can view the code here: https://github.com/vercel/next-rsc-demo
-
Next.js 12
From my understanding from watching the keynote earlier today, the reason that demo has JS is that repo opted in to have client side code to handle the upvote functionality. If it didn't require that interactivity it could be shipped with no client side JS. The client side js code is defined in the component files ending in .client.js
https://github.com/vercel/next-rsc-demo/tree/main/components
What are some alternatives?
react-18 - Workgroup for React 18 release.
vike - 🔨 Like Next.js / Nuxt but as do-one-thing-do-it-well Vite plugin.
cross-env
Next.js - The React Framework
rfcs - RFCs for changes to React
nextjs-tailwind-ionic-capacitor-starter - A starting point for building an iOS, Android, and Progressive Web App with Tailwind CSS, React w/ Next.js, Ionic Framework, and Capacitor
react-component-compiler - React Client and Server Components without a Framework
swc-node - Faster ts-node without typecheck
miro-workshop-finished - A finished version of the 2022 We Are Developers workshop hosted by Miro
supabase - The open source Firebase alternative.
rfcs - RFCs for changes to React
esbuild - An extremely fast bundler for the web