0% found this document useful (0 votes)
35 views

Building Your Own Hooks

A custom Hook is a JavaScript function that starts with "use" and may call other Hooks. Hooks allow components to subscribe to data sources and manage local state in a way that is fully isolated and allows passing information between hooks. Hooks are a way to reuse stateful logic without changing component hierarchy and automatically check for violations.

Uploaded by

collenedesilva
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views

Building Your Own Hooks

A custom Hook is a JavaScript function that starts with "use" and may call other Hooks. Hooks allow components to subscribe to data sources and manage local state in a way that is fully isolated and allows passing information between hooks. Hooks are a way to reuse stateful logic without changing component hierarchy and automatically check for violations.

Uploaded by

collenedesilva
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

- A custom Hook is a JavaScript function whose name starts with ” use” and that may call other

Hooks.
o To automatically check for violations
- We can return a ternary function
- fully isolated states
- We can pass information between hooks

You might also like