That is, I have a set of some pre-created components on react, and I need to make for them a common store, where information about each component (shown or hidden, etc.) and the component `

[ {name: 'FirstComponent', comp: <First />, isOpen: true }, {name: 'SecondComponent', comp: <Second />, isOpen: false } ] 

`

And only then work with them in the main component.

    1 answer 1

    redux store must store the state being serialized.

    Therefore, the answer to your question is that you cannot store components in the store .

    Therefore, as an option - to store unique string identifiers for components.

    For example:

    1) create a key in the store : showYourBlock - which for example will be a bool value.

    2) then write to your root component in render

      render() { return ( <div> {showYourBlock && <YourComponent />} </div> ) }