Added webpack.ProvidePlugin for most used imports

Removed imports of React, connect, PropTypes throughout
Removed the "React" in React.Component/PureComponent
This commit is contained in:
mgabdev
2019-07-29 15:20:00 -04:00
parent dd6129e218
commit 2044648179
224 changed files with 92 additions and 532 deletions

View File

@@ -1,11 +1,9 @@
import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { injectIntl, FormattedMessage } from 'react-intl';
import SettingToggle from '../../notifications/components/setting_toggle';
export default @injectIntl
class ColumnSettings extends React.PureComponent {
class ColumnSettings extends PureComponent {
static propTypes = {
settings: ImmutablePropTypes.map.isRequired,

View File

@@ -1,4 +1,3 @@
import { connect } from 'react-redux';
import ColumnSettings from '../components/column_settings';
import { changeSetting, saveSettings } from '../../../actions/settings';

View File

@@ -1,7 +1,4 @@
import React from 'react';
import { connect } from 'react-redux';
import { expandHomeTimeline } from '../../actions/timelines';
import PropTypes from 'prop-types';
import StatusListContainer from '../ui/containers/status_list_container';
import Column from '../../components/column';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
@@ -19,7 +16,7 @@ const mapStateToProps = state => ({
export default @connect(mapStateToProps)
@injectIntl
class HomeTimeline extends React.PureComponent {
class HomeTimeline extends PureComponent {
static propTypes = {
dispatch: PropTypes.func.isRequired,