Unfortunately this is not a good example of using a reducer. It could work for pagination, but you would place the next/previous/set logic inside of the reducer. In this case it's essentially used as useState.
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.
Unfortunately this is not a good example of using a reducer. It could work for pagination, but you would place the next/previous/set logic inside of the reducer. In this case it's essentially used as useState.