/react-tutorial

Scratch work repository for learning React

Primary LanguageTypeScriptMIT LicenseMIT

React + TypeScript + Vite

Part of this project follows the tutorial on https://www.youtube.com/watch?v=SqcY0GlETPk. The project also includes additional work to show unit testing and uses GitHub Actions for continuous integration.

Overview

This is a tutorial for single client side react app built with vite.

Project Structure

Package Manager

The Nodejs Package Manager (npm) is used to manage the production and development dependencies. See https://www.npmjs.com/ for more details on npm.

Build System

The Vite build tool helps to package the source code and package it for a production release. It is also used to help with development and testing. See https://vitejs.dev/guide/ for more details on Vite.

Setup

Install React Developer Tools.

Install nodejs > 20.x https://nodejs.org/en.

Install modules, build, and test:

npm install
npm run build
npm run test:unit

For interactive testing:

npm run test:ui

Debugging

In VS Code, open a "JavaScript Debug Terminal".

Next, run the testing command inside the new terminal.

Building

npm run build

Development Environment

npm run dev