diff --git a/client/auth/login.jsx b/client/auth/login.jsx index 23ca2481ad091..4dfad78bb8602 100644 --- a/client/auth/login.jsx +++ b/client/auth/login.jsx @@ -2,7 +2,8 @@ * External dependencies */ import ReactDom from 'react-dom'; -import React from 'react/addons'; +import React from 'react'; +import LinkedStateMixin from 'react-addons-linked-state-mixin'; /** * Internal dependencies @@ -36,7 +37,7 @@ const LostPassword = React.createClass( { module.exports = React.createClass( { displayName: 'Auth', - mixins: [ React.addons.LinkedStateMixin, eventRecorder ], + mixins: [ LinkedStateMixin, eventRecorder ], componentDidMount: function() { AuthStore.on( 'change', this.refreshData ); diff --git a/client/components/forms/form-phone-input/index.jsx b/client/components/forms/form-phone-input/index.jsx index 43d5b7ec32ed3..c7bf80baf737e 100644 --- a/client/components/forms/form-phone-input/index.jsx +++ b/client/components/forms/form-phone-input/index.jsx @@ -1,7 +1,8 @@ /** * External dependencies */ -var React = require( 'react/addons' ), +var React = require( 'react' ), + LinkedStateMixin = require( 'react-addons-linked-state-mixin' ), noop = require( 'lodash/utility/noop' ), first = require( 'lodash/array/first' ), where = require( 'lodash/collection/where' ); @@ -21,7 +22,7 @@ var CLEAN_REGEX = /^0|[\s.\-()]+/g; module.exports = React.createClass( { displayName: 'FormPhoneInput', - mixins: [ React.addons.LinkedStateMixin ], + mixins: [ LinkedStateMixin ], propTypes: { initialCountryCode: React.PropTypes.string, diff --git a/client/me/account-password/index.jsx b/client/me/account-password/index.jsx index 8cd2c0547dd3e..d153182af0910 100644 --- a/client/me/account-password/index.jsx +++ b/client/me/account-password/index.jsx @@ -1,7 +1,8 @@ /** * External dependencies */ -var React = require( 'react/addons' ), +var React = require( 'react' ), + LinkedStateMixin = require( 'react-addons-linked-state-mixin' ), debug = require( 'debug' )( 'calypso:me:account-password' ), _debounce = require( 'lodash/function/debounce' ), _first = require( 'lodash/array/first' ), @@ -28,7 +29,7 @@ module.exports = React.createClass( { displayName: 'AccountPassword', - mixins: [ React.addons.LinkedStateMixin, protectForm.mixin, observe( 'accountPasswordData' ), eventRecorder ], + mixins: [ LinkedStateMixin, protectForm.mixin, observe( 'accountPasswordData' ), eventRecorder ], componentDidMount: function() { this.debouncedPasswordValidate = _debounce( this.validatePassword, 300 ); diff --git a/client/me/account/index.jsx b/client/me/account/index.jsx index 794a0397e8201..90f380b0614c3 100644 --- a/client/me/account/index.jsx +++ b/client/me/account/index.jsx @@ -2,6 +2,7 @@ * External dependencies */ import React from 'react/addons'; +import LinkedStateMixin from 'react-addons-linked-state-mixin'; import i18n from 'lib/mixins/i18n'; import Debug from 'debug'; import emailValidator from 'email-validator'; @@ -58,7 +59,7 @@ module.exports = React.createClass( { mixins: [ formBase, - React.addons.LinkedStateMixin, + LinkedStateMixin, protectForm.mixin, observe( 'userSettings', 'username' ), eventRecorder diff --git a/client/me/application-passwords/index.jsx b/client/me/application-passwords/index.jsx index a73161c6409cd..9da9cf99c56d9 100644 --- a/client/me/application-passwords/index.jsx +++ b/client/me/application-passwords/index.jsx @@ -1,7 +1,8 @@ /** * External dependencies */ -var React = require( 'react/addons' ), +var React = require( 'react' ), + LinkedStateMixin = require( 'react-addons-linked-state-mixin' ), debug = require( 'debug' )( 'calypso:application-passwords' ); /** @@ -27,7 +28,7 @@ module.exports = React.createClass( { displayName: 'ApplicationPasswords', - mixins: [ observe( 'appPasswordsData' ), React.addons.LinkedStateMixin, eventRecorder ], + mixins: [ observe( 'appPasswordsData' ), LinkedStateMixin, eventRecorder ], componentDidMount: function() { debug( this.displayName + ' React component is mounted.' ); @@ -177,7 +178,7 @@ module.exports = React.createClass( {
diff --git a/client/me/help/help-contact-form/index.jsx b/client/me/help/help-contact-form/index.jsx index 51ed1c24d4f6c..1c643caf4b5a9 100644 --- a/client/me/help/help-contact-form/index.jsx +++ b/client/me/help/help-contact-form/index.jsx @@ -1,7 +1,8 @@ /** * External dependencies */ -import React from 'react/addons'; +import React from 'react'; +import LinkedStateMixin from 'react-addons-linked-state-mixin'; import PureRenderMixin from 'react-pure-render/mixin'; import isEqual from 'lodash/lang/isEqual'; @@ -27,7 +28,7 @@ const sites = siteList(); module.exports = React.createClass( { displayName: 'HelpContactForm', - mixins: [ React.addons.LinkedStateMixin, PureRenderMixin ], + mixins: [ LinkedStateMixin, PureRenderMixin ], propTypes: { formDescription: React.PropTypes.node, diff --git a/client/me/notification-settings/reader-subscriptions/index.jsx b/client/me/notification-settings/reader-subscriptions/index.jsx index 499a2e19e84b9..a1574be5f9ae6 100644 --- a/client/me/notification-settings/reader-subscriptions/index.jsx +++ b/client/me/notification-settings/reader-subscriptions/index.jsx @@ -1,7 +1,8 @@ /** * External dependencies */ -import React from 'react/addons'; +import React from 'react'; +import LinkedStateMixin from 'react-addons-linked-state-mixin'; /** * Internal dependencies @@ -28,7 +29,7 @@ import Main from 'components/main'; module.exports = React.createClass( { displayName: 'NotificationSubscriptions', - mixins: [ formBase, React.addons.LinkedStateMixin, protectForm.mixin, observe( 'userSettings' ), eventRecorder ], + mixins: [ formBase, LinkedStateMixin, protectForm.mixin, observe( 'userSettings' ), eventRecorder ], getDeliveryHourLabel( hour ) { return this.translate( diff --git a/client/me/profile-links-add-other/index.jsx b/client/me/profile-links-add-other/index.jsx index dfbca806fea26..eef96e8a46801 100644 --- a/client/me/profile-links-add-other/index.jsx +++ b/client/me/profile-links-add-other/index.jsx @@ -1,7 +1,8 @@ /** * External dependencies */ -var React = require( 'react/addons' ); +var React = require( 'react' ), + LinkedStateMixin = require( 'react-addons-linked-state-mixin' ); /** * Internal dependencies @@ -16,7 +17,7 @@ module.exports = React.createClass( { displayName: 'ProfileLinksAddOther', - mixins: [ React.addons.LinkedStateMixin, eventRecorder ], + mixins: [ LinkedStateMixin, eventRecorder ], getInitialState: function() { return { diff --git a/client/me/profile/index.jsx b/client/me/profile/index.jsx index 136339b108a43..c36ccf05dd81d 100644 --- a/client/me/profile/index.jsx +++ b/client/me/profile/index.jsx @@ -1,7 +1,8 @@ /** * External dependencies */ -var React = require( 'react/addons' ), +var React = require( 'react' ), + LinkedStateMixin = require( 'react-addons-linked-state-mixin' ), debug = require( 'debug' )( 'calypso:me:profile' ); /** @@ -28,7 +29,7 @@ module.exports = React.createClass( { displayName: 'Profile', - mixins: [ formBase, React.addons.LinkedStateMixin, protectForm.mixin, observe( 'userSettings' ), eventRecorder ], + mixins: [ formBase, LinkedStateMixin, protectForm.mixin, observe( 'userSettings' ), eventRecorder ], componentDidMount: function() { debug( this.constructor.displayName + ' component is mounted.' ); diff --git a/client/me/reauth-required/index.jsx b/client/me/reauth-required/index.jsx index b8593426a9342..eebb518fbf499 100644 --- a/client/me/reauth-required/index.jsx +++ b/client/me/reauth-required/index.jsx @@ -1,7 +1,8 @@ /** * External dependencies */ -var React = require( 'react/addons' ), +var React = require( 'react' ), + LinkedStateMixin = require( 'react-addons-linked-state-mixin' ), debug = require( 'debug' )( 'calypso:me:reauth-required' ); /** @@ -25,7 +26,7 @@ module.exports = React.createClass( { displayName: 'ReauthRequired', - mixins: [ React.addons.LinkedStateMixin, observe( 'twoStepAuthorization' ), eventRecorder ], + mixins: [ LinkedStateMixin, observe( 'twoStepAuthorization' ), eventRecorder ], getInitialState: function() { return { diff --git a/client/me/security-2fa-backup-codes-prompt/index.jsx b/client/me/security-2fa-backup-codes-prompt/index.jsx index 3258d68b0ff1a..1d703e51b2cc0 100644 --- a/client/me/security-2fa-backup-codes-prompt/index.jsx +++ b/client/me/security-2fa-backup-codes-prompt/index.jsx @@ -1,7 +1,8 @@ /** * External dependencies */ -var React = require( 'react/addons' ), +var React = require( 'react' ), + LinkedStateMixin = require( 'react-addons-linked-state-mixin' ), debug = require( 'debug' )( 'calypso:me:security:2fa-backup-codes-prompt' ); /** @@ -20,7 +21,7 @@ module.exports = React.createClass( { displayName: 'Security2faBackupCodesPrompt', - mixins: [ React.addons.LinkedStateMixin ], + mixins: [ LinkedStateMixin ], propTypes: { onPrintAgain: React.PropTypes.func, diff --git a/client/me/security-2fa-code-prompt/index.jsx b/client/me/security-2fa-code-prompt/index.jsx index b82ef12a33653..355d910d3703f 100644 --- a/client/me/security-2fa-code-prompt/index.jsx +++ b/client/me/security-2fa-code-prompt/index.jsx @@ -1,7 +1,8 @@ /** * External dependencies */ -var React = require( 'react/addons' ), +var React = require( 'react' ), + LinkedStateMixin = require( 'react-addons-linked-state-mixin' ), debug = require( 'debug' )( 'calypso:me:security:2fa-code-prompt' ); /** @@ -22,7 +23,7 @@ module.exports = React.createClass( { displayName: 'Security2faCodePrompt', - mixins: [ React.addons.LinkedStateMixin ], + mixins: [ LinkedStateMixin ], codeRequestTimer: false, diff --git a/client/me/security-2fa-enable/index.jsx b/client/me/security-2fa-enable/index.jsx index e47139b88595c..23dab71e9e823 100644 --- a/client/me/security-2fa-enable/index.jsx +++ b/client/me/security-2fa-enable/index.jsx @@ -1,7 +1,8 @@ /** * External dependencies */ -var React = require( 'react/addons' ), +var React = require( 'react' ), + LinkedStateMixin = require( 'react-addons-linked-state-mixin' ), debug = require( 'debug' )( 'calypso:me:security:2fa-enable' ), QRCode = require( 'qrcode.react' ), classNames = require( 'classnames' ); @@ -24,7 +25,7 @@ module.exports = React.createClass( { displayName: 'Security2faEnable', - mixins: [ React.addons.LinkedStateMixin ], + mixins: [ LinkedStateMixin ], codeRequestTimer: false, diff --git a/client/me/security-2fa-sms-settings/index.jsx b/client/me/security-2fa-sms-settings/index.jsx index c0ec2156b45d2..083313f396e4d 100644 --- a/client/me/security-2fa-sms-settings/index.jsx +++ b/client/me/security-2fa-sms-settings/index.jsx @@ -1,7 +1,8 @@ /** * External dependencies */ -var React = require( 'react/addons' ), +var React = require( 'react' ), + LinkedStateMixin = require( 'react-addons-linked-state-mixin' ), debug = require( 'debug' )( 'calypso:me:security:2fa-sms-settings' ), observe = require( 'lib/mixins/data-observe' ); @@ -31,7 +32,7 @@ module.exports = React.createClass( { debug( this.constructor.displayName + ' React component will unmount.' ); }, - mixins: [ formBase, React.addons.LinkedStateMixin, protectForm.mixin, observe( 'userSettings' ) ], + mixins: [ formBase, LinkedStateMixin, protectForm.mixin, observe( 'userSettings' ) ], propTypes: { onCancel: React.PropTypes.func.isRequired, diff --git a/client/me/security-checkup/edit-email.jsx b/client/me/security-checkup/edit-email.jsx index 90fcf7b96d264..98f4422e5d416 100644 --- a/client/me/security-checkup/edit-email.jsx +++ b/client/me/security-checkup/edit-email.jsx @@ -2,7 +2,8 @@ * External dependencies */ var ReactDom = require( 'react-dom' ), - React = require( 'react/addons' ), + React = require( 'react' ), + LinkedStateMixin = require( 'react-addons-linked-state-mixin' ), emailValidator = require( 'email-validator' ); /** @@ -17,7 +18,7 @@ var FormFieldset = require( 'components/forms/form-fieldset' ), module.exports = React.createClass( { displayName: 'SecurityCheckupRecoveryEmailEdit', - mixins: [ React.addons.LinkedStateMixin ], + mixins: [ LinkedStateMixin ], propTypes: { storedEmail: React.PropTypes.string, diff --git a/client/my-sites/ads/form-settings.jsx b/client/my-sites/ads/form-settings.jsx index a4a8ee6a53a56..2c43e0f8db12f 100644 --- a/client/my-sites/ads/form-settings.jsx +++ b/client/my-sites/ads/form-settings.jsx @@ -1,7 +1,8 @@ /** * External dependencies */ -var React = require( 'react/addons' ), +var React = require( 'react' ), + LinkedStateMixin = require( 'react-addons-linked-state-mixin' ), notices = require( 'notices' ), debug = require( 'debug' )( 'calypso:my-sites:ads-settings' ); @@ -29,7 +30,7 @@ module.exports = React.createClass( { displayName: 'AdsFormSettings', - mixins: [ React.addons.LinkedStateMixin, protectForm.mixin ], + mixins: [ LinkedStateMixin, protectForm.mixin ], propTypes: { site: React.PropTypes.object.isRequired, diff --git a/client/my-sites/people/edit-team-member-form/index.jsx b/client/my-sites/people/edit-team-member-form/index.jsx index 60200fe8d4087..e4c695cb283a5 100644 --- a/client/my-sites/people/edit-team-member-form/index.jsx +++ b/client/my-sites/people/edit-team-member-form/index.jsx @@ -1,7 +1,8 @@ /** * External dependencies */ -var React = require( 'react/addons' ), +var React = require( 'react' ), + LinkedStateMixin = require( 'react-addons-linked-state-mixin' ), PureRenderMixin = require( 'react-pure-render/mixin' ), debug = require( 'debug' )( 'calypso:my-sites:people:edit-team-member-form' ), omit = require( 'lodash/object/omit' ), @@ -38,7 +39,7 @@ var Main = require( 'components/main' ), var EditUserForm = React.createClass( { displayName: 'EditUserForm', - mixins: [ React.addons.LinkedStateMixin, PureRenderMixin ], + mixins: [ LinkedStateMixin, PureRenderMixin ], getInitialState: function() { return this.getStateObject( this.props ); diff --git a/client/my-sites/site-settings/delete-site/index.jsx b/client/my-sites/site-settings/delete-site/index.jsx index 918bbd23463e8..b7d13e3fb87ff 100644 --- a/client/my-sites/site-settings/delete-site/index.jsx +++ b/client/my-sites/site-settings/delete-site/index.jsx @@ -1,7 +1,8 @@ /** * External dependencies */ -var React = require( 'react/addons' ), +var React = require( 'react' ), + LinkedStateMixin = require( 'react-addons-linked-state-mixin' ), debug = require( 'debug' )( 'calypso:my-sites:site-settings' ), page = require( 'page' ); @@ -25,7 +26,7 @@ module.exports = React.createClass( { displayName: 'DeleteSite', - mixins: [ React.addons.LinkedStateMixin ], + mixins: [ LinkedStateMixin ], getInitialState: function() { return { diff --git a/package.json b/package.json index 7600dafe33cb1..7f85d5dcc634b 100644 --- a/package.json +++ b/package.json @@ -71,6 +71,7 @@ "raf": "2.0.4", "react": "0.14.3", "react-addons-create-fragment": "0.14.3", + "react-addons-linked-state-mixin": "0.14.3", "react-day-picker": "1.1.0", "react-dom": "0.14.3", "react-pure-render": "1.0.2",