React Server Side Components

From bibbleWiki
Revision as of 03:03, 23 September 2023 by Iwiseman (talk | contribs) (First example)
Jump to navigation Jump to search

Introduction

React by default downloads your bundles and generates HTML on the client. This approach change the process to generate HTML on the Server and send it to the client. This should.

  • Improve SEO as the HTML can now by read on the server by the robots
  • Improve the user experience as the HTML is rendered quicker
  • Maybe improve performance
  • Make the build a bit more complex

First example

This was taken from [here]

npm i express
npm i @babel/preset-env @babel/preset-react @babel/register
npm i ignore-styles