From fffdc7726e9434fa3d46d8213a96bb6f82e86aef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20J=C3=B6ch?= Date: Mon, 11 Dec 2017 11:37:18 +0100 Subject: [PATCH] #8: updated readme with HOC decorator information --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index d2f1ae9..877d0fb 100644 --- a/README.md +++ b/README.md @@ -104,6 +104,16 @@ export default class BasicInput extends React.Component { } ``` +**Note**: +You need the _babel-plugin-transform-decorators_ plugin to use the ``@Input`` decorator. +If you don't want or cannot add this plugin to you webpack config you need to use the HOC as a +function (like the ``connect()`` HOC of Redux). + +Example: ``export default input()(BasicInput)`` + +See the [Babel Documentation](https://babeljs.io/docs/plugins/transform-decorators/) for a detailed guide +about how to add decorators to your application. + ## Contribution The project requires at least the latest stable version of node and npm. You also need to have yarn installed globally.