Skip to content

swyxio/amplify-react-serverless-components

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

amplify-react-serverless-components

a trial app to deploy React Server Components inside of a serverless AWS Lambda function, scaffolded using the AWS Amplify CLI

image

Context - What are React Server Components?

The main React code and serverless code can be found in /amplify/backend/function/rsc/src.

You can watch the live stream here! https://www.youtube.com/watch?v=VA3TFymZlW4

The main steps are:

  • take https://github.com/pomber/server-components-demo React team demo minus Postgres
  • create a new serverless function from scratch
  • copy over the dependencies
  • copy over the minimal client code
  • copy over the minimal server code and adapt it to a serverless context
  • fix the build script
  • make sure to set nodejs flags and env variables exactly according to the original React team demo
  • Warning: client components dont work in production if you are compiling them on your machine because they use absolute paths (LINK TO DAN ABRAMOV TWEET)0

About

a trial app to deploy React Server Components inside of a serverless AWS Lambda function, scaffolded using the AWS Amplify CLI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published