Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
1094 Widoki

OWL Framework

Awatar
Odrzuć
Najlepsza odpowiedź

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.

Awatar
Odrzuć