Skip to content

Latest commit

 

History

History

docs

Hooks Documentation

Halogen Hooks is a new library for Halogen, but Hooks as a concept were originally pioneered by React. The structure of this documentation is adapted from the React Hooks documentation and many of the core ideas are the same.

You should read Introducing Halogen Hooks before diving in to this documentation.

If you reach a portion of this documentation which is incomplete, you may benefit from reading a similar section in the React documentation. I also encourage you to reach out on this repository's issue tracker about the information you wanted to know but couldn't find in this documentation.

The Hooks Internals documentation can help you if you would like to contribute to this library and need to understand its design decisions.

Table of Contents

  1. Hooks At a Glance
  2. The State Hook (useState)
  3. The Effect Hook (useLifecycleEffect, useTickEffect)
  4. The Query Hook (useQuery)
  5. HookM
  6. Writing Your Own Hooks
  7. The Hooks API
  8. Hooks FAQ
  9. Hooks Internals