Skip to content

A React web application template with Redux, React Router, Typescript and TailwindCSS supported.

License

Notifications You must be signed in to change notification settings

sennett-lau/template-react-web

Repository files navigation

Template React Web

Description

This project is a web template for ReactJS, using the following technologies:

  • ReactJS
  • Redux
  • TailwindCSS
  • Typescript
  • React Router
  • Craco

Installation

Clone this repository by running the following command:

git clone git@github.com:laub1199/template-react-web.git

To install the project, you need to have NodeJS installed on your machine. After that, you can run the following commands:

npm install

Implementation

Development

For development purposes, you can run the following command:

npm run start

Production

For production purposes, you can run the following command:

npm run build

A folder called build will be created, containing the production files. You can serve these files using any web server.

Usage

Hooks

Some reusable hooks are available in the src/hooks folder.

useWindowDimensions

This hook returns the current window dimensions.

// To import the hook
import useWindowDimensions from '@hooks/useWindowDimensions'

// Hook implementation in a component
const { width, height } = useWindowDimensions();

License

This library is licensed under the MIT License. See the LICENSE file for more information.