Custom hooks
In this chapter, you learn about custom hooks, which extract logic in a reusable form.
In this chapter, you learn about custom hooks, which extract logic in a reusable form.
Hooks are scripts registered against events in settings.json. We organize the 8 events used in this environment and the self-correction feedback mechanism via exit 2.
Reading a file auto-loads path-scoped rules, and the moment you rewrite it, PreToolUse / PostToolUse hooks step in. We look at the mechanisms that structurally block "the easy fix."
Protect a standard with a pair of "a Guide that steers in prose" and "a Sensor that mechanically catches what is missed." We look at the sharpest example of the cross-classification, using the requirements-grilling skill /grill-me.
The moment /debug returns its answer, seven hooks run in parallel on the Stop event. We explain the difference between Sensors that block immediately and log-only Sensors that just observe first.
In this chapter, you learn about the `useContext` hook, used to share data across the entire component tree.
In this chapter, you learn about the `useEffect` hook, which handles side effects.
In this chapter, you learn about the `useReducer` hook, used to manage complex state logic.
In this chapter, you learn about the `useRef` hook, used for direct DOM access and holding values, and related APIs.