@inquirer/core@12.0.0
⚠️ Breaking change
The setter returned by useState now accepts an updater/reducer function (currentValue) => nextValue, mirroring React. The updater always receives the latest state (read from the hook store at call time), which simplifies async and reducer-style state updates.
Type change: the setter signature moves from (newValue: Value) => void to (newValue: NotFunction<Value> | Reducer<Value>) => void.
Impact: any code that stored a function as a value via useState's setter now has that function interpreted as a reducer. This is a type-level breaking change for consumers of the core hook API.
What's new
useStatesetter accepts a reducer function(currentValue) => nextValue(#2225)
Dependencies
@inquirer/figuresbumped to^2.0.8