Results for “Custom hooks”
Small, practical examples. Search by task or narrow things down below.
Delay publishing a rapidly changing value
Delay publishing a rapidly changing value with a small React component and explicit browser behavior.
React✓ Tested
Encapsulate increment and reset operations
Encapsulate increment and reset operations with a small React component and explicit browser behavior.
React✓ Tested
Expose immutable collection operations
Expose immutable collection operations with a small React component and explicit browser behavior.
React✓ Tested
Extract reusable toggle behavior
Extract reusable toggle behavior with a small React component and explicit browser behavior.
React✓ Tested
Keep separate state for separate hook calls
Keep separate state for separate hook calls with a small React component and explicit browser behavior.
React✓ Tested
Reset state to a caller-provided initial value
Reset state to a caller-provided initial value with a small React component and explicit browser behavior.
React✓ Tested
Reuse controlled-input bindings
Reuse controlled-input bindings with a small React component and explicit browser behavior.
React✓ Tested
Reuse document-title synchronization
Reuse document-title synchronization with a small React component and explicit browser behavior.
React✓ Tested
Reuse event subscription cleanup
Reuse event subscription cleanup with a small React component and explicit browser behavior.
React✓ Tested
Attach a custom data attribute
HTML: Learn how to attach a custom data attribute in a complete browser example.
HTML✓ Tested
Bind a custom data attribute
Bind a custom data attribute with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Customize a renderer through a function prop
Customize a renderer through a function prop with a small React component and explicit browser behavior.
React✓ Tested