Prerequisites:
• HTML
• CSS
• Basics of JavaScript ES6
• Basics Of React Library
• HTML
• CSS
• Basics of JavaScript ES6
• Basics Of React Library
We have 3 Files:
App.jsx
App.css
Index.jsx
App.jsx
App.css
Index.jsx
Step 2: Write logic and structure of the application inside App.jsx
• Declare a state count and a function setCount to get updated value of count. This can be done using the useState hook.
• Declare a state count and a function setCount to get updated value of count. This can be done using the useState hook.
Now here’s some challenges for you:
1. Increment and decrement the count by 10, instead 1.
2. Make two text boxes, each with two buttons; the first box should only increase the number by 5, and the second box should only decrease the value by 5.
Challenges added in code file👇
1. Increment and decrement the count by 10, instead 1.
2. Make two text boxes, each with two buttons; the first box should only increase the number by 5, and the second box should only decrease the value by 5.
Challenges added in code file👇
Here’s the code of counter app:
codedamn.com
codedamn.com
Complete the challenges and let us know in the comments 📝
That's a wrap!
if you enjoyed this thread:
1. Follow us @codedamncom for more of these.
2. Retweet the first tweet above to share with your friends.
if you enjoyed this thread:
1. Follow us @codedamncom for more of these.
2. Retweet the first tweet above to share with your friends.
Loading suggestions...