Lifecycle Methods

Component Lifecycle Methods

WebComp provides the exact same lifecycle methods as React:

Note: Lifecycle methods don't work in stateless components and string render.

Element Lifecycle Methods

In addition to component lifecycle, WebComp also provides lifecycle methods for custom element itself.

Keep in mind that these are for the elements themselves, not underlying Preact component instances, so all these methods are static.

Last updated