A simple React calculator.
Project hosted on GitHub pages
- Split code into smaller components
- Refactor multiple useState into useReducer
Clone the project
git clone https://github.com/raissa-k/lab-react-calculator.git
Go to the project directory
cd lab-react-calculator
Install dependencies
npm install
Start the server
npm run dev
Update package.json
:
"homepage": "https://<YOUR-USERNAME>.github.io/<YOUR-REPO-NAME>/",
Update vite-config.json
base: '/<YOUR-REPO-NAME>/',
Add a new repository secret DEPLOY_TOKEN
through https://github.com/settings/tokens
with workflow permissions.
Either run from your terminal:
npm run deploy
Or make use of GitHub workflow actions to automatically deploy updates when merging into main
.