Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
React state question - Kevin Powell - Community
KP-C
Kevin Powell - Community
•
3y ago
•
31 replies
aevitas
React state question
Hi
,
I
've been stuck on this for a few hours now but I can
't figure it out
.
https://codesandbox.io/s/practical-beaver-vgcmcv?file=/src/App.js
I basically map over an array of items and for each item I made an input to fill in a value of the item
.
Filling in a value for this item should do 2 possible things
:
Make a new object with the e
.target
.name
, e
.target
.value and object
.amount
or
Update the value in an existing object
(if this value has previously been filled in
)
CodeSandbox
practical-beaver-vgcmcv - CodeSandbox
practical
-beaver
-vgcmcv using loader
-utils
, react
, react
-dom
, react
-scripts
Kevin Powell - Community
Join
A friendly place for developers to meet other devs, ask questions, get help, and just have a good time 🙂.
36,263
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
React state issue
KP-C
Kevin Powell - Community / front-end
3y ago
React Query state management
KP-C
Kevin Powell - Community / front-end
4y ago
React beginner question
KP-C
Kevin Powell - Community / front-end
3y ago