Fixed a bug
Found an issue in a project where the component wasn't updating when the user switched pages (and the component was present on both).

The problem: abstracting out the props into their own state meant that when the component props updated, the state did not. As we were very reliant on the state for not only props but also counting how many should be displayed, it was a very weird interaction.

The solution

arrayFromProps.slice(0, sizeFromState).map(() => //do something)
Where we sliced and mapped through the prop directly, rather than setting it as a state object first and then mapping that.

Very weird one! Glad it's solved now!