From 6c2a8656fb96c462de8510403ecec6d2da8638dc Mon Sep 17 00:00:00 2001 From: Ezeky Date: Sun, 16 Jul 2017 00:35:02 +0200 Subject: [PATCH] possibility to reset the refCounter --- src/react-inline-css.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/react-inline-css.js b/src/react-inline-css.js index 40252cf..c6b7981 100644 --- a/src/react-inline-css.js +++ b/src/react-inline-css.js @@ -33,6 +33,9 @@ var InlineCss = createReactClass({ ); }, render: function () { + if(this.props.counter){ + refCounter = this.props.counter; + } var namespace = this.props.namespace || "InlineCss-" + refCounter++; var componentName = this.props.componentName || "&"; var stylesheet = this._transformSheet(this.props.stylesheet, componentName, namespace);