Writing to a variable defined outside a component or hook is not allowed
Unanswered
Siberian posted this in #help-forum
SiberianOP
With the new react compiler, linter I have a few
What is the suggested way to solve this?
Writing to a variable defined outside a component or hook is not allowed. Consider using an effect
an example of something triggering this is const onSomeEvent = () => {
document.body.style.overflow = showMobileFilters ? "auto" : "hidden";
};
What is the suggested way to solve this?