Creating a new React Router application

Prerequisites

Install the development tools

Visual Studio Code

pnpm

See Install pnpm

Create the new application

To create a new React Router web application create a directory for the project and open a terminal and execute

npx create-react-router@latest MY_APPLICATION_NAME

If you want to create the Git repository on a higher level, answer NO to the Initialize a new git repository? question.

If you want to use PNPM as node package manager, answer NO to the Install dependencies with npm? question and issue the
pnpm install -r
command in the root folder of the repository to only have one real copy of the node modules. PNPM creates symbolic links from subdirectories to refer to the one file instance to save space on the hard drive.

Run the application

To run the web application, in the application root directory execute

cd MY_APPLICATION_NAME
pnpm i
pnpm run dev

For more on React Router web applications see Building React Router (Remix) web applications

Leave a comment

Your email address will not be published. Required fields are marked *