useReducer
на сайте с April 07, 2023 04:06
useReducer is usually preferable to useState when you have complex state logic that involves multiple sub-values or when the next state depends on the previous ...