Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"devDependencies": {
"@cypress/react18": "^2.0.1",
"@mate-academy/scripts": "^1.8.5",
"@mate-academy/scripts": "^2.1.2",
"@mate-academy/stylelint-config": "*",
"@vitejs/plugin-react": "^4.3.1",
"cypress": "^13.13.0",
Expand Down
6 changes: 3 additions & 3 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ import { useState } from 'react';
import './App.scss';

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This initializes count to 0 which violates the requirement: "Initial count state should align with producing the given sequence when clicking "Increase" repeatedly". To produce the sequence starting with 101 on the first Increase, initialize count appropriately (for example to 100) or compute the next value inside increase so the first Increase yields 101. See task description for the exact sequence requirement.


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

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

// DON'T change the code below
Expand Down