How update data on click? (solved)

SOLUTION https://codesandbox.io/p/sandbox/young-wind-m5xz9r Question: I get setNumbers is not a function I want click on button and setItem[{},{}...] Relation to question have files Numbers.tsx and NumbersContext.tsx
re-render on click with localstorage
CodeSandbox is an online editor tailored for web applications.
4 Replies
Jochem
Jochem12mo ago
the only place setNumbers (with s) is mentioned in your code is in AdminModal.tsx, in NumbersContext.tsx it's called setNumber (without s) it might be necessary to provide some more info, like what you have to do to generate the error, or which specific error you're getting, including line numbers and all that
Nikita
Nikita12mo ago
I wnat re-render data on click and save it to local storage @jochemm If you have some time to help let's go DM or call me when you want I explain you what I exactly want
Jochem
Jochem12mo ago
no thanks, you can explain in here and someone else can help because I don't have a lot of react experience. I'm just advising you to add more info here so others can help you're much more likely to get help if you put effort in up front so that people can look and try to solve the problem. I've helped dozens of people on here with problems I do know about, but I've never once gone on a call or dms with them, simply because that is a commitment of time and energy most people just won't make without a good idea of what the problem is https://dontasktoask.com/ This site puts it better than I can also to clarify @nicitaa, part of the reason we have these channels is so that people in the future can come and learn from the problems others have had that have been solved on here. They can't do that if you take explanations to DM
Nikita
Nikita12mo ago
absolutely SOLVED