--- layout: ../../layouts/content-with-cover.astro title: 'Getting Started with React' description: 'Get started with this in-depth tutorial on how to build React applications and websites with Snowpack and developer tools like React Fast Refresh' date: 2020-12-01 tags: communityGuide cover: '/img/ReactGuide.jpg' img: '/img/ReactGuide.jpg' --- Snowpack is a great fit for [React](https://reactjs.org/) projects of any size. It's easy to get started and can scale to projects containing thousands of components and pages without any impact on development speed. Unlike traditional React application tooling, Snowpack saves you from getting bogged down with complex bundler setups and configuration files. In this guide, you'll go from an empty directory to a fully configured Snowpack project with support for React and several other useful developer tools. In the process, you'll learn: - How to set up your Snowpack development environment - Adding your first React component - Working with CSS, images and other web assets - Enabling [Fast Refresh](https://reactnative.dev/docs/fast-refresh) mode for React - Connecting your favorite tools Prerequisites: Snowpack is a command line tool installed from npm. This guide assumes a basic understanding of Node.js, npm, and how to run commands in the terminal. Knowledge of React is not required, Snowpack is a great way to learn React! > 💡 Tip: if you want to jump to the end to see a full featured React setup, the [Create Snowpack App React template](https://github.com/snowpackjs/snowpack/tree/main/create-snowpack-app/app-template-react) comes with everything you'll learn in this guide plus other useful tools. ## Getting started The easiest way to start a new Snowpack project is with [Create Snowpack App](https://github.com/snowpackjs/snowpack/tree/main/create-snowpack-app/cli), a tool to set up Snowpack in a new directory. `@snowpack/project-template-minimal` is a Create Snowpack App template for a simple, bare-bones Snowpack project setup that the rest of this guide builds on. To get started, open your terminal and head to a directory where you want to put your new project. Now run the following command in your terminal to create a new directory called `react-snowpack` with the minimal template automatically installed. ```bash npx create-snowpack-app react-snowpack --template @snowpack/app-template-minimal ``` You can now head to the new directory and start Snowpack with the following two commands: ```bash cd react-snowpack npm start ``` You should see your new website up and running! > 💡 Tip: the `README.md` in your new project contains useful information about what each file does.