From 666f0e4a2f84446d0fed9564b2be47d3894b7050 Mon Sep 17 00:00:00 2001 From: Jack Howard Date: Wed, 11 Sep 2019 13:39:12 -0500 Subject: [PATCH] Run lifecycle code mod renaming unsafe --- lib/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/index.js b/lib/index.js index e8314a2..b969c93 100644 --- a/lib/index.js +++ b/lib/index.js @@ -11,7 +11,7 @@ var createReactClass = require("create-react-class") var { Provider, Consumer } = React.createContext() var ActionCableProvider = createReactClass({ - componentWillMount: function () { + UNSAFE_componentWillMount: function () { if (this.props.cable) { this.cable = this.props.cable } else { @@ -25,7 +25,7 @@ var ActionCableProvider = createReactClass({ } }, - componentWillReceiveProps: function (nextProps) { + UNSAFE_componentWillReceiveProps: function (nextProps) { // Props not changed if ( this.props.cable === nextProps.cable && @@ -38,7 +38,7 @@ var ActionCableProvider = createReactClass({ this.componentWillUnmount() // create or assign cable - this.componentWillMount() + this.UNSAFE_componentWillMount() }, render: function () {