Not directly, no.
You have two solutions to this
- Lets say you have two components A and B. If they have to share state, then you have to encapsulate both A and B in a parent component. Their shared "state" will reside inside the parent's
this.state and would be sent down as props to A and B.
- Move state out of components and to a state-management solution like Redux or MobX.
If you have any questions on this, feel free to leave a reply! 😄