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,10 +1,9 @@
import React from 'react';
import ComposeFormContainer from '../../compose/containers/compose_form_container';
import NotificationsContainer from '../../ui/containers/notifications_container';
import LoadingBarContainer from '../../ui/containers/loading_bar_container';
import ModalContainer from '../../ui/containers/modal_container';
export default class Compose extends React.PureComponent {
export default class Compose extends PureComponent {
render () {
return (

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 { expandHashtagTimeline } from 'gabsocial/actions/timelines';
import Masonry from 'react-masonry-infinite';
@@ -16,7 +13,7 @@ const mapStateToProps = (state, { hashtag }) => ({
});
export default @connect(mapStateToProps)
class HashtagTimeline extends React.PureComponent {
class HashtagTimeline extends PureComponent {
static propTypes = {
dispatch: PropTypes.func.isRequired,

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 { expandPublicTimeline, expandCommunityTimeline } from 'gabsocial/actions/timelines';
import Masonry from 'react-masonry-infinite';
@@ -20,7 +17,7 @@ const mapStateToProps = (state, { local }) => {
};
export default @connect(mapStateToProps)
class PublicTimeline extends React.PureComponent {
class PublicTimeline extends PureComponent {
static propTypes = {
dispatch: PropTypes.func.isRequired,