Identifies a method that is called after a component is updated or re-rendered.
Re-render in this circumstance means that a component has been mounted on the DOM
and changes to the component are being applied to the dom.
There must only be one method annotated with this annotation in a single component.
This method is invoked in the "commit" phase using reacts
componentDidUpdate()
lifecycle method.
The method must also conform to the following constraints:
- Must not be annotated with any other react4j annotation
- Must have 0 parameters
- Must not return a value
- Must not be private
- Must not be public
- Must not be static
- Must not be abstract
- Must not throw exceptions
- Must be accessible from the same package as the class annotated by
ReactComponent
-
Should not be public as not expected to be invoked outside the component. A warning will be generated but can
be suppressed by the
SuppressWarnings
or SuppressReact4jWarnings
annotations with a key
"React4j:PublicMethod". This warning is also suppressed by the annotation processor if it is implementing
an interface method.
-
Should not be protected if in the class annotated with the
ReactComponent
annotation as the method is not
expected to be invoked outside the component. A warning will be generated but can be suppressed by the
SuppressWarnings
or SuppressReact4jWarnings
annotations with a key "React4j:ProtectedMethod".