The "React TypeScript Minimal + Jest" project is a minimal React application configured with TypeScript, Esbuild for compilation, and Jest for testing. It provides a simple and ready-to-use structure, enabling efficient development of React applications and testing using Jest and React Testing Library.
Make sure to have Node 18 installed on your machine.
- Clone this repository:
git clone https://github.com/saulocastillos/react-typescript-minimal
- Navigate to the project directory:
cd react-typescript-minimal
- Install dependencies:
npm install
To start the development server with live reload:
npm run dev
This will start the server at http://localhost:3000
. Open your browser and see the application in action. Live reload ensures that code changes are automatically reflected in the browser.
The project structure is organized as follows:
entry-point.tsx
: Entry point of the application.index.html
: Main HTML page of the project.jest.config.js
: Jest configurations for testing.src
: Contains the source code of the application.app.tsx
: Main component of the application.app.spec.tsx
: Tests for theApp
component.
package.json
: Project configuration file.tsconfig.json
: TypeScript configurations for the project.
- React
- TypeScript
- Esbuild
- Jest
- React Testing Library
- dev: Starts the development server with live reload using Esbuild.
- build: Generates production output files using Esbuild.
- test: Runs tests using Jest.
Tests are written using Jest and React Testing Library. To run the tests, use the following command:
npm test
If you want to contribute to this project, feel free to open an issue or submit a pull request.
This project is licensed under the MIT License - see the MIT file for details.
Author: Saulo Castillos 🚀