Skip to main content

9 docs tagged with "hooks"

View all tags

Custom hooks

In this chapter, you learn about custom hooks, which extract logic in a reusable form.

How hooks work

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.

The Guide-and-Sensor pair (detour: /grill-me)

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 Stop hook at the end of a response

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.

useContext

In this chapter, you learn about the `useContext` hook, used to share data across the entire component tree.

useEffect

In this chapter, you learn about the `useEffect` hook, which handles side effects.

useReducer

In this chapter, you learn about the `useReducer` hook, used to manage complex state logic.

useRef and DOM manipulation

In this chapter, you learn about the `useRef` hook, used for direct DOM access and holding values, and related APIs.