Replacing Components
For example, if you wanted to use your own CustomLogo
component you would do:
Note that replace
will preserve any HoCs originally defined using set
. In other words, in the following example:
The CustomLogo
component will also be wrapped with withCurrentUser
and withRouter
.
Once you've replaced the Logo
component with your own CustomLogo
, BR.Components.get('Logo')
will now return CustomLogo
. If you want an easy way to keep track of which components have been customized, you could add a custom
attribute when calling the component as a reminder for yourself:
Last updated