Skip to content

wlegolas/react-counter-example

Repository files navigation

🚀 About this project

This repository contains a React application that allows users to increment and decrement a counter.

This project was bootstrapped with Create Vite App using the react-ts template.

To build this project I followed the Feature Folder structure where the main goal is to centralize inside the features folder the implementation by context. In this article Evolution of a React folder structure and why to group by features right away you can get more information about this architecture.

In this project there are two features:

  • app: This feature provides all things related to the application.
  • counter: This feature provides all mechanism to interact with the Counter.

You can check the documentation Functionalities to see more information about the project and the functionalities.

🛠 Tech stack

Project structure

Testing

Linting

📚 Getting Started

To set up your local environment, after cloning this repository, you will need to:

  1. Install Node.js v20.9.0 or above, if not already installed (I recommend using nvm)
  2. Install Yarn v1.22.19 or above, if not already installed
  3. Install the project's dependencies: run yarn install on the project's root directory

⚙️ Commands

Running the application locally:

To run the application locally, run the following command:

yarn start

Note: After started, the application will be available at port 5173. You can access through the following URL http://localhost:5173

Testing:

To execute all the test, run the following command:

yarn test

To execute the tests with the watch mode, run the following command:

yarn test:watch

Linting:

To analyze if there are issues related to the project code, run the following command:

yarn prettier:check

To check if there are issues related to the project code style, run the following command:

yarn prettier:check

To fix issues related to the project code style, run the following command:

yarn prettier:fix

📒 License

This project is under the MIT license.

About

React project with an example of a Counter application

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published