The real power of React comes from its ability to be mutable and interactive. React components have a state, which works exactly as it sounds like it should – they change dependant on the state. This state can be set or changed as a result of the user’s interaction with the application. The ability to set state is the real power behind react as it allows the application to become fully interactive. This state can be managed in many ways, with the most basic application being its inclusion in the component itself. I have used a package that works with React called Redux.js which allows for state to be shared across all components, thus extending the ability of the web application to be interactive.
Dealing with state was a challenge at first. Among other things, understanding how to make the JSX markup change as a result of the state was particularly hard as it requires a strong understanding of the React documentation. I found that understanding react’s integrated state alone first before using extension packages meant that the learning process went more smoothly than if I had used packages like Redux from the start.
Until next time,