This repository will guide you through all the basic building blocks required to create a server-side rendering (SSR) application using ReactJS.
- Objective: Learn to set up a basic Express server.
- Contents:
- Display the text "Hello, World" on the server.
- Introduce Nodemon for live reloading, demonstrating how to update the displayed message to "Hello, World!"
- Objective: Understand the role of Rollup in our SSR setup and configure it for the project.
- Contents:
- Introduction to Rollup and its core functionalities.
- Configure Rollup to compile in a Node.js environment using the CommonJS and nodeResolve plugins.
- Discuss the importance of the
externalproperty to prevent the bundling of Node modules.
- Objective: Implement server-side rendering with React.
- Contents:
- Use
renderToStringto render React components on the server. - Transition to using JSX in our project and set up the necessary Babel configuration to make Node.js understand JSX.
- Use
To get started with the project, clone the repository and install the necessary dependencies:
git clone https://github.com/sosumit001/react-ssr-from-scratch.git
cd react-ssr-from-scratch
npm install