mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
7e6b1a28a0
Before this rev, using t-component on a div (for example) node would silently ignore the div and replace it by the root node of the component. A way to improve this was to create an extra div node and to put the component inside it. However, it raised questions: what do we do with other attributes set on this tag? Do we apply them on the div, or on the component? In addition, some of them only make sense on the component (e.g. props), so we have to detect them. Whatever we would have decided, it wouldn't have been obvious from the user point of view, so we chose not to support it, and we thus now raise an error in this case. Closes #487.
🦉 OWL Documentation 🦉
Reference
- Animations
- Component
- Configuration
- Context
- Environment
- Event Bus
- Hooks
- Miscellaneous Components
- Observer
- Props
- QWeb Templating Language
- QWeb Engine
- Router
- Store
- Tags
- Utils
Learning Resources
Miscellaneous
Architecture
This section explains in more detail the inner workings of Owl. It is targeted for developers working on Owl itself.
Owl Content
Here is a complete visual representation of everything exported by the owl
global object (so, for example, Component is available at owl.Component,
and EventBus is exported as owl.core.EventBus):
Component misc
Context AsyncRoot
QWeb router
Store Link
useState RouteComponent
config Router
mode tags
core xml
EventBus utils
Observer debounce
hooks escape
onWillStart loadJS
onMounted loadFile
onWillUpdateProps shallowEqual
onWillPatch whenReady
onPatched
onWillUnmount
useContext
useState
useRef
useSubEnv
useStore
useDispatch
useGetters
Note that for convenience, the useState hook is also exported at the root of the owl object.