Shouldn't you be able to achieve the same design with useState instead if you use 2 providers (1 for the data, which changes often, and 1 for the functions that shouldn't update)?
This seems a better practice than using ref which brings us back to the issue of the classes era with mutable values. Whereas splitting in 2 contexts leverage closures to achieve the same thing.
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.
Shouldn't you be able to achieve the same design with
useState
instead if you use 2 providers (1 for the data, which changes often, and 1 for the functions that shouldn't update)?This seems a better practice than using ref which brings us back to the issue of the classes era with mutable values. Whereas splitting in 2 contexts leverage closures to achieve the same thing.