Skip to content

Commit

Permalink
add task solution
Browse files Browse the repository at this point in the history
  • Loading branch information
kovaltar committed Feb 7, 2025
1 parent 6cbf305 commit 0b06388
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ So the third button should count like this:
- Install Prettier Extesion and use this [VSCode settings](https://mate-academy.github.io/fe-program/tools/vscode/settings.json) to enable format on save.
- Implement a solution following the [React task guideline](https://github.com/mate-academy/react_task-guideline#react-tasks-guideline).
- Open one more terminal and run tests with `npm test` to ensure your solution is correct.
- Replace `<your_account>` with your Github username in the [DEMO LINK](https://<your_account>.github.io/react_counter-js/) and add it to PR description.
- Replace `<your_account>` with your Github username in the [DEMO LINK](https://kovaltar.github.io/react_counter-js/) and add it to PR description.
7 changes: 3 additions & 4 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@ import { useState } from 'react';
import './App.scss';

export const App = () => {
const [count] = useState(0);
const [count, setCount] = useState(0);

const addOne = () => {
// write code here
setCount(currentCount => currentCount + 1);
};

const add100 = () => {
// write code here
setCount(currentCount => currentCount + 100);
};

// DON'T change the code below
const increase = () => {
if (count % 5 === 0) {
add100();
Expand Down

0 comments on commit 0b06388

Please sign in to comment.