upgrade-owl3-use-effect (U2033)#
useEffect(fn, dependencies), whose meaning OWL 3 (Odoo 20.0) changed.
Applies to Odoo 20.0 and later.
What it does#
Reports useEffect from @odoo/owl called with a dependencies function.
Why is this bad?#
OWL 3’s useEffect(fn) runs again when the signals fn reads change; it
takes no dependencies. Odoo 20.0’s compatibility layer keeps the OWL 2
behaviour as useLayoutEffect.
Fix safety#
Safe: when every useEffect of the file has dependencies, it becomes
useLayoutEffect, as Odoo 20.0’s own migration does.