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';
const select = state => ({});
const perform = () => ({});
export default connect(select, perform)(IframeReact);
export default IframeReact;

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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