The new @reactjs documentation site is full of information about how to create your own hooks. You can also use hooks in the WordPress block editor and share them between blocks and other parts of the site.
#keep-your-custom-hooks-focused-on-concrete-high-level-use-cases" target="_blank" rel="nofollow noopener">react.dev/learn/reusing-…