Don't connect to the Redux store when not needed.

The subscription still costs something per update cycle even when the parameters are null or empty objects.
This commit is contained in:
infinite-persistence 2021-10-23 13:57:42 +08:00
parent 17121b2066
commit e2176d0566
No known key found for this signature in database
GPG key ID: B9C3252EDC3D0AA0
14 changed files with 14 additions and 80 deletions

View file

@ -1,8 +1,3 @@
import { connect } from 'react-redux';
import IframeReact from './view'; import IframeReact from './view';
const select = state => ({}); export default IframeReact;
const perform = () => ({});
export default connect(select, perform)(IframeReact);

View file

@ -1,6 +1,3 @@
import { connect } from 'react-redux';
import AbandonedChannelPreview from './view'; import AbandonedChannelPreview from './view';
const select = (state, props) => ({}); export default AbandonedChannelPreview;
export default connect(select)(AbandonedChannelPreview);

View file

@ -1,7 +1,3 @@
import { connect } from 'react-redux';
import Expandable from './view'; import Expandable from './view';
export default connect( export default Expandable;
null,
null
)(Expandable);

View file

@ -1,11 +1,3 @@
import { connect } from 'react-redux';
import i18n from './view'; import i18n from './view';
const select = state => ({}); export default i18n;
const perform = () => ({});
export default connect(
select,
perform
)(i18n);

View file

@ -1,6 +1,3 @@
import { connect } from 'react-redux';
import LivestreamList from './view'; import LivestreamList from './view';
const select = (state) => ({}); export default LivestreamList;
export default connect(select)(LivestreamList);

View file

@ -1,6 +1,3 @@
import { connect } from 'react-redux';
import LoadingBarOneOff from './view'; import LoadingBarOneOff from './view';
const select = (state, props) => ({}); export default LoadingBarOneOff;
export default connect(select)(LoadingBarOneOff);

View file

@ -1,11 +1,3 @@
import { connect } from 'react-redux';
import Tag from './view'; import Tag from './view';
const select = state => ({}); export default Tag;
const perform = () => ({});
export default connect(
select,
perform
)(Tag);

View file

@ -1,8 +1,3 @@
import { connect } from 'react-redux';
import YoutubeBadge from './view'; import YoutubeBadge from './view';
const select = state => ({}); export default YoutubeBadge;
const perform = dispatch => ({});
export default connect(select, perform)(YoutubeBadge);

View file

@ -1,9 +1,3 @@
import { connect } from 'react-redux';
import FourOhFourPage from './view'; import FourOhFourPage from './view';
const select = state => ({}); export default FourOhFourPage;
export default connect(
select,
null
)(FourOhFourPage);

View file

@ -1,6 +1,3 @@
import { connect } from 'react-redux';
import ReceivePage from './view'; import ReceivePage from './view';
const select = (state) => ({}); export default ReceivePage;
export default connect(select, {})(ReceivePage);

View file

@ -1,8 +1,3 @@
import { connect } from 'react-redux';
import ReportContentPage from './view'; import ReportContentPage from './view';
const select = (state) => ({}); export default ReportContentPage;
const perform = (dispatch) => ({});
export default connect(select, perform)(ReportContentPage);

View file

@ -1,6 +1,3 @@
import { connect } from 'react-redux';
import SendPage from './view'; import SendPage from './view';
const select = (state) => ({}); export default SendPage;
export default connect(select, null)(SendPage);

View file

@ -1,6 +1,3 @@
import { connect } from 'react-redux';
import SwapPage from './view'; import SwapPage from './view';
const select = (state) => ({}); export default SwapPage;
export default connect(select, null)(SwapPage);

View file

@ -1,10 +1,3 @@
import { connect } from 'react-redux';
import Welcome from './view'; import Welcome from './view';
const select = () => ({}); export default Welcome;
const perform = () => ({});
export default connect(
select,
perform
)(Welcome);