(action)
| 224 | wipFiber.stateHooks.push(stateHook); |
| 225 | |
| 226 | function setState(action) { |
| 227 | const isFunction = typeof action === "function"; |
| 228 | |
| 229 | stateHook.queue.push(isFunction ? action : () => action); |
| 230 | |
| 231 | wipRoot = { |
| 232 | ...currentFiber, |
| 233 | alternate: currentFiber, |
| 234 | }; |
| 235 | nextUnitOfWork = wipRoot; |
| 236 | } |
| 237 | |
| 238 | return [stateHook.state, setState]; |
| 239 | } |
no outgoing calls
no test coverage detected