I'm having an issue with changing the state of a label in a tab when I do scroll on the page. I don't know if componentDidMount() is responsible for it, but I've tried a lot of things and I just can't reach the solution. Here is the demo representing all my problems: https://codesandbox.io/embed/clever-babbage-bzlbe?fontsize=14&hidenavigation=1&theme=dark
If you notice, the shadow loses the transition on the second time you do scroll down, but if you remove the this.setState
's, it will be perfect. How this can be possible to solve?