Utility functions for warning about deprecated components.
- Source:
Methods
(inner) deprecate(name, message)
Print a warning about a deprecated component, once per component.
Components are rendered for every page, so the warning is only printed the first time.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
name |
string
|
Name of the component, such as share.addthis.
|
message |
string
|
Why the component is deprecated, and what to use instead. |
Example
deprecate('share.addthis', 'Service shut down. Use AddToAny or ShareThis.');