Would it be possible to lift the state up to the common ancestor of all those components and then drill it down using props? If not, you may want to reach for Redux.
PHP & JavaScript engineer/ dog enthusiast. He is working on [PluginMachine](https://pluginmachine.com) a framework for WordPress plugin development.🌱🌵🌲
What I like about writing state management decoupled from React is I can make that call later. If I have an updateItem, removeItem, and deleteItem, and they have tests, I can choose to use React.useState() or something Redux-like depending on my need.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Would it be possible to lift the state up to the common ancestor of all those components and then drill it down using props? If not, you may want to reach for Redux.
The updater method is
setItems
.Yes. That would be a good startegy.
What I like about writing state management decoupled from React is I can make that call later. If I have an updateItem, removeItem, and deleteItem, and they have tests, I can choose to use React.useState() or something Redux-like depending on my need.