deprecate decorators

This commit is contained in:
Nils Knappmeier
2019-10-09 07:16:20 +02:00
committed by GitHub
parent 566536b03d
commit c56995d706
+2
View File
@@ -1,5 +1,7 @@
# Decorators
**Decorators are deprecated, please join the discussion at [#1574](https://github.com/wycats/handlebars.js/issues/1574) to see what we can do about it.**
Decorators allow for blocks to be annotated with metadata or wrapped in functionality prior to execution of the block. This may be used to communicate with the containing helper or to setup a particular state in the system prior to running the block.
Decorators are registered through similar methods as helpers, `registerDecorators` and `unregisterDecorators`. These can then be referenced via the friendly name in the template using the `{{* decorator}}` and `{{#* decorator}}{/decorator}}` syntaxes. These syntaxes are derivatives of the normal mustache syntax and as such have all of the same argument and whitespace behaviors.