Skip to content

React App with Typescript, using webpack5 and styled-components

Notifications You must be signed in to change notification settings

rubinj30/webpack-react-typescript-starter

Repository files navigation

React App with Typescript Boilerplate

This is a starter app for React apps with Typescript, using Webpack as the bundler. I was setting it up for personal use, and figured I'd add some notes in case others wanted to use.

This includes the newest version of React (17.0.1), which means it no longer is necessary to import React into each file with components. This starter app uses TypeScript to transform JSX to ES5 code, via the "jsx": "react-jsx", setting in the tsconfig.json. If your files with JSX are flagging this make sure you are using the workspaces version of TypeScript, or upgrade TypeScript globally to be > 4.1.0.

Getting Started

Clone the repository:

git clone https://github.com/rubinj30/webpack-react-typescript-starter.git

Install the dependencies:

yarn install (or npm install)

Start the application and it will be running at http://localhost:8080:

yarn start (or npm start)

NOTE: if you end up using NPM, then you can remove the yarn.lock file and use the package-lock.json file

Other base libraries included

Styling - styled-components

Routing - react-router v5

Testing React components - React Testing Library

Test runner - Jest

Linting - ESLint

Formatting - Prettier

Pre-commit Hook - husky

Ensure committed code changes are linted/formatted - lint-staged

About

React App with Typescript, using webpack5 and styled-components

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published