From 937f0b8923b9e4e4aaddd68f6a00e7d550d87ba3 Mon Sep 17 00:00:00 2001 From: Gvidon Malyarov Date: Fri, 23 Jun 2017 20:34:21 +0300 Subject: [PATCH] Avoid deprecation meessages https://facebook.github.io/react/blog/2017/04/07/react-v15.5.0.html#migrating-from-react.createclass --- src/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 7389581..abf7428 100644 --- a/src/index.js +++ b/src/index.js @@ -1,5 +1,6 @@ var React = require('react') var InputMask = require('inputmask-core') +var createReactClass = require('create-react-class') var KEYCODE_Z = 90 var KEYCODE_Y = 89 @@ -57,7 +58,7 @@ function setSelection(el, selection) { catch (e) { /* not focused or not visible */ } } -var MaskedInput = React.createClass({ +var MaskedInput = createReactClass({ propTypes: { mask: React.PropTypes.string.isRequired,