upgrade-owl3-removed-hooks (U2032)#
A hook imported from @odoo/owl that OWL 3 (Odoo 20.0) no longer has.
Applies to Odoo 20.0 and later.
What it does#
Reports imports of useState, reactive, useRef, useExternalListener,
onRendered and useChildSubEnv from @odoo/owl.
Why is this bad?#
OWL 3 dropped them and Odoo 20.0’s compatibility layer does not bring them
back: the import is undefined and the component fails when it is set up.
Fix safety#
Safe where the replacement is mechanical, as Odoo 20.0’s own migration
does it: useState(x) and a one-argument reactive(x) become proxy(x),
useExternalListener becomes useListener. useRef becomes a signal
(root = signal.ref() with t-ref="this.root"); onRendered and
useChildSubEnv need a look.