With a React FE, most components should remain pure while leaving only a few components with the responsibility to handle state updates. React context or state management libraries make this concept easier to follow
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
The big question/problem is how to use pure functions in a real-world, complex app.
Here is some small example:
After clicking a menu item, I need to scroll to top.
This function has a side effect.
What do you think, How to make this one to be a pure function/
With a React FE, most components should remain pure while leaving only a few components with the responsibility to handle state updates. React context or state management libraries make this concept easier to follow