Functions as Values
A function type describes a callable. type Formatter = (value: number) => string.
This is what you use for callback props, event handlers and anything passed to map. Typing it is where a surprising number of real bugs get caught, because the wrong argument to a callback is exactly the kind of thing nobody notices until it runs.
Mark this lesson complete
Signed in, your progress follows you to every device.