PHP & JavaScript engineer/ dog enthusiast. He is working on [PluginMachine](https://pluginmachine.com) a framework for WordPress plugin development.🌱🌵🌲
That example is massively over simplified, I can see why it's confusing. In my case it does need to be decoupled from the component as the state is shared in multiple components. Also, state management is shared with parts of the page that are not created with React.
Yes, what you show works for adding an item. It would still need an updater method.
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.
That example is massively over simplified, I can see why it's confusing. In my case it does need to be decoupled from the component as the state is shared in multiple components. Also, state management is shared with parts of the page that are not created with React.
Yes, what you show works for adding an item. It would still need an updater method.