mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[DOC] hooks: add missing doc for onWillPatch/onPatched
This commit is contained in:
+19
-4
@@ -10,6 +10,8 @@
|
|||||||
- [`useState`](#usestate)
|
- [`useState`](#usestate)
|
||||||
- [`onMounted`](#onmounted)
|
- [`onMounted`](#onmounted)
|
||||||
- [`onWillUnmount`](#onwillunmount)
|
- [`onWillUnmount`](#onwillunmount)
|
||||||
|
- [`onWillPatch`](#onwillpatch)
|
||||||
|
- [`onPatched`](#onpatched)
|
||||||
- [`useRef`](#useref)
|
- [`useRef`](#useref)
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
@@ -169,16 +171,29 @@ class Counter extends owl.Component {
|
|||||||
|
|
||||||
### `onMounted`
|
### `onMounted`
|
||||||
|
|
||||||
`onMounted` is not an hook, but is a building block designed to help make useful
|
`onMounted` is not an user hook, but is a building block designed to help make useful
|
||||||
hooks. `onMounted` register a callback, which will be called when the component
|
abstractions. `onMounted` registers a callback, which will be called when the component
|
||||||
is mounted (see example on top of this page).
|
is mounted (see example on top of this page).
|
||||||
|
|
||||||
### `onWillUnmount`
|
### `onWillUnmount`
|
||||||
|
|
||||||
`onWillUnmount` is not an hook, but is a building block designed to help make useful
|
`onWillUnmount` is not an user hook, but is a building block designed to help make useful
|
||||||
hooks. `onWillUnmount` register a callback, which will be called when the component
|
abstractions. `onWillUnmount` registers a callback, which will be called when the component
|
||||||
is unmounted (see example on top of this page).
|
is unmounted (see example on top of this page).
|
||||||
|
|
||||||
|
|
||||||
|
### `onWillPatch`
|
||||||
|
|
||||||
|
`onWillPatch` is not an user hook, but is a building block designed to help make useful
|
||||||
|
abstractions. `onWillPatch` registers a callback, which will be called just
|
||||||
|
before the component patched.
|
||||||
|
|
||||||
|
### `onPatched`
|
||||||
|
|
||||||
|
`onPatched` is not an user hook, but is a building block designed to help make useful
|
||||||
|
abstractions. `onPatched` registers a callback, which will be called just
|
||||||
|
after the component patched.
|
||||||
|
|
||||||
### `useRef`
|
### `useRef`
|
||||||
|
|
||||||
The `useRef` hook is useful when we need a way to interact with some inside part
|
The `useRef` hook is useful when we need a way to interact with some inside part
|
||||||
|
|||||||
@@ -16,6 +16,8 @@ owl
|
|||||||
hooks
|
hooks
|
||||||
onMounted
|
onMounted
|
||||||
onWillUnmount
|
onWillUnmount
|
||||||
|
onWillPatch
|
||||||
|
onPatched
|
||||||
useState
|
useState
|
||||||
useRef
|
useRef
|
||||||
router
|
router
|
||||||
|
|||||||
Reference in New Issue
Block a user