Skip to Content
Menú
This question has been flagged
1 Respondre
1042 Vistes

OWL Framework

Avatar
Descartar
Best Answer

Hooks were popularised by React as a way to solve the following issues:

  • help reusing stateful logic between components
  • help organizing code by feature in complex components
  • use state in functional components, without writing a class.

Owl hooks serve the same purpose, except that they work for class components (note: React hooks do not work on class components, and maybe because of that, there seems to be the misconception that hooks are in opposition to class. This is clearly not true, as shown by Owl hooks).

Hooks work beautifully with Owl components: they solve the problems mentioned above, and in particular, they are the perfect way to make your component reactive.

To find out, visit the following link to the official documentation.

Avatar
Descartar