Hi! I want to connect image viewer like react-image-lightbox or react-images-viewer.
Every image-viewer plugin requires to pass prop with array of images. I decided to add array of images to global state using processor.
You should never mutate the state directly from your components. You should, instead, create actions to mutate state and call those actions from your components.
@mburridge thanks for the clarification there. I think I was modifying state in one of my handlers, whereas it sounds like I need to create an action for this.
Is the theme index the only place where state modifier actions can be created? (well apart from importing a function into the index)
@codemonkeynorth it stucks in infinite loop. As previosly sayed that state should be updated from action, not the way I do it through a mutation. New question appears: how to acess to actions in processor
I have already found right solution of my problem without image storage in state. But anyway this is interesting problem - how to access actions in processor? It is not current problem anymore but research interest: HOW TO?