Registers a function to be called when composited classlist changes
âš Remember not to use anonymous function!! (pass a named function reference instead)
Unregisters a previsously registered classlist change listener
âš Remember not to use anonymous function!! (pass a named function reference instead)
Generated using TypeDoc
The "consumer level" part of Decoration
ClasslistCompositecontains composited classnames from all the decorations applicable to a targetThe composite includes all the applicable inheritances and negations.
Note that due to performance considerations,
ClasslistCompositeis one of the few cases where we do not useDisposablesfor event management and instead use old schooladdChangeListener/removeChangeListenermethods.Remember to pass same named function reference to
addChangeListenerandremoveChangeLiseneerwhile subscribing and unsusbscribing incomponentDidMountandcomponentWillUnmountrespectively.Note: You should also implement a
componentDidUpdatehook where you can unsubscribe from previous decoration object and subscribe to the new one.