Warning!Hence the component extends from React Component, do not use any of its API. It may be removed in the future and using it may cause incompatibility with Wazapp components!
propsexactly like in React Component returns an Object of passed properties to the component. They are automatically tracked by Wazapp.
template(props: P, context: this): ReactNode | void
template(props)allows you to define your component template written in JSX. Remember that you are still working in React so things like
classare still required.
ReactNodeor nothing. By default if not defined it will
yield()allows you to return component's
childrenor in case the
childrenis a function, it will allow you to call it with custom arguments.
any- your custom arguments that will be used on
childrenis a function)
didMountis invoked immediately after a component is mounted (inserted into the tree). Initialization that requires DOM nodes should go here.
didUpdateis invoked immediately after updating occurs. This method is not called for the initial render.
T<ComponentProps>- previous component properties
willUnmountis invoked immediately before a component is unmounted and destroyed. Perform any necessary cleanup in this method, such as invalidating timers, canceling network requests, or cleaning up any subscriptions that were created in