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,6 +1,4 @@
import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import Button from 'gabsocial/components/button';
import ImmutablePureComponent from 'react-immutable-pure-component';
import { defineMessages, injectIntl } from 'react-intl';

View File

@@ -1,4 +1,3 @@
import React from 'react';
import ImmutablePureComponent from 'react-immutable-pure-component';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { injectIntl, defineMessages } from 'react-intl';

View File

@@ -1,4 +1,3 @@
import { connect } from 'react-redux';
import Header from '../components/header';
import { joinGroup, leaveGroup } from '../../../../actions/groups';

View File

@@ -1,6 +1,3 @@
import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import StatusListContainer from '../../ui/containers/status_list_container';
import Column from '../../../components/column';
@@ -22,7 +19,7 @@ const mapStateToProps = (state, props) => ({
export default @connect(mapStateToProps)
@injectIntl
class GroupTimeline extends React.PureComponent {
class GroupTimeline extends PureComponent {
static contextTypes = {
router: PropTypes.object,
};