Оно асынс. А почему не можешь?
Warning: State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()
Ну вот так вот. Ну окей понятно, но у меня этот state меняеться очень часто, а мне надо side effect вызвать только в 1 методе как тогда обойтись?