Skip to content

exemplar-codes/assorted-reactjs-apps

Repository files navigation

USP

Set up, and deploy React app for free within 10 seconds. Vite > CRA

React + Vite (ignorable)

I am tired of create-react-app, it's very slow to npm install and npm start. I intent to use this as my go to React template.

How to use

  1. npm install - install dependencies
  2. npm run dev - start dev server
  3. npm run predeploy && npm run deploy - deploy latest commit to github pages. No manual work is needed. Just visit the URL, it should be live!

Using repo as template (optional)

  1. Fork this repo on GitHub to start a new project.
  2. Run npm run fix_package_json_for_current_repo. This fixes the homepage and name keys, which are needed for GitHub pages deployment.
  3. Add package.json and commit.

Notes

  • Tip: Use pnpm instead of npm for even faster installation time.
  • Deletable/starter code is marked by an underscore at the end. Folders and contents like this can be deleted without affecting Vite.

Tools

  1. Tailwind - added node package to project, so sorting of classes works. Install prettier (to activate sorting) and tailwind official extension (for intellisense) on vscode.
  2. Scss - installed node package. The tailwind vscode extension gives highlighting support for Tailwind stuff in scss files.