Skip to content

Dadudida-com/rsc-demo

This branch is 4 commits ahead of ziir/rsc-demo:refs/heads/master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

2046168 · Mar 11, 2024

History

19 Commits
Mar 11, 2024
Nov 7, 2023
Nov 12, 2023
Nov 12, 2023
Nov 13, 2023
Nov 10, 2023
Nov 7, 2023
Nov 8, 2023
Nov 12, 2023
Nov 7, 2023
Nov 10, 2023
Nov 10, 2023
Nov 10, 2023

Repository files navigation

React Server Components (RSC) Notes App Demo / Playground without a framework

Screenshot of the RSC Notes App Demo / Playground

Disclaimer

Please note, there is absolutely nothing optimal about the following implementation yet, it is purposely naive, incomplete, and is intended for learning & demo purposes.

Objectives

  • a somewhat functional React Notes App (listing, creating, editing & deleting notes with a text title & Markdown content)
  • React Server Components used alongside Client Components
  • some sort of server-side rendering
  • some kind of data-fetching using Server Components
  • routing that somewhat works both in the client & on the server
  • refreshing server components from the client
  • a usable RSC playground
  • above all else: learn

Getting Started

Developed on Node.js v18.18.1 + npm v9.8.1

  • git clone this repository
  • npm ci

Dev Environment

  • start a Webpack process, watching for changes in ./src and outputting built files to ./dist
  • start a Node.js HTTP Server (with Fastify) at http://localhost:3000, watching for changes in ./server, ./src & ./dist with Nodemon
npm run dev

Prod Environment

Run the Webpack build & start the Node.js HTTP Server, for production.

npm run build
npm start

Main Dependencies

  • Webpack bundler
  • Babel JavaScript compiler, for transpiling JSX syntax
  • Fastify for the HTTP web server
  • a-route extremely minimal JavaScript / DOM routing library leveraging Custom Elements

Misc

About

React Server Components (RSC) Demo / Playground without a framework

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 84.2%
  • CSS 14.0%
  • HTML 1.8%