12

React Router Tailwind Boilerplate

Boilerplate for your next webapp šŸ§‘ā€šŸ’»

Boilerplate for your next webapp šŸ§‘ā€šŸ’»

What's in it: šŸ’¼

Structure: āš™ļø

src
ā”œā”€ā”€ App.js
ā”œā”€ā”€ components
ā”‚   ā”œā”€ā”€ Footer.js
ā”‚   ā”œā”€ā”€ Hero.js
ā”‚   ā””ā”€ā”€ Nav.js
ā”œā”€ā”€ index.js
ā”œā”€ā”€ routes
ā”‚   ā”œā”€ā”€ routes.js
ā”‚   ā””ā”€ā”€ userRoutes.js
ā””ā”€ā”€ views
   ā”œā”€ā”€ Home.js
   ā”œā”€ā”€ NotFoundPage.js
   ā””ā”€ā”€ Start.js

Screenshot:

Landing Screenshot

How to use this Boilerplate: šŸ”§

  1. Clone the new repo: git clone git@github.com:anistark/react-router-tailwind-boilerplate.git. (You can also fork the repo and then clone it.)
  2. cd react-router-tailwind-boilerplate
  3. Node version built on: v17.0.1. You can check your node version by node -v.
    1. You can switch to the supported version by using nvm or n. Example: nvm use 17.
    2. If you use some other version of node. Feel free to check the compatibility and report back if it doesn't work.
  4. Setup Dependencies: npm install or yarn install.

Available Scripts: āœ”ļø

In the project directory, you can run:

npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in your browser.

The page will reload when you make changes.
You may also see any lint errors in the console.

nodemon

Nodemon helps in auto-reloading your application on detecting any changes to your js code. Very useful while developing. Instead of npm start as stated above you can use nodemon. Do make sure that nodemon is installed globally against your node verison prior. Install using: npm install -g nodemon.

npm test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

npm run build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.

npm run eject

Note: this is a one-way operation. Once you eject, you can't go back!

If you aren't satisfied with the build tool and configuration choices, you can eject at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.

You don't have to ever use eject. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.

Learn More: šŸ“œ

You can learn more in the Create React App documentation.

To learn React, check out the React documentation.

Code Splitting

This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting

Analyzing the Bundle Size

This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size

Making a Progressive Web App

This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app

Advanced Configuration

This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration

Deployment

This section has moved here: https://facebook.github.io/create-react-app/docs/deployment

npm run build fails to minify

This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify

More Tailwind UI Components: šŸŽØ

Contribution Areas: šŸ™Œ

  1. Add a new feature. Just check open PRs if someone else is already working on have worked on it the past.
  2. Request new Features.

Follow me on github and twitter for more updates and staying updates with my work āœØ