-
-
Notifications
You must be signed in to change notification settings - Fork 668
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify connect and boundActions (#1289)
- Loading branch information
1 parent
fa9e183
commit be28d5b
Showing
61 changed files
with
282 additions
and
461 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,11 @@ | ||
/* @flow */ | ||
import { connect } from 'react-redux'; | ||
|
||
import boundActions from '../boundActions'; | ||
import connectWithActions from '../connectWithActions'; | ||
import { getActiveNarrow, getIsFetching, getIfNoMessages } from '../selectors'; | ||
import Chat from './Chat'; | ||
|
||
export default connect( | ||
state => ({ | ||
isOnline: state.app.isOnline, | ||
isFetching: getIsFetching(state), | ||
narrow: getActiveNarrow(state), | ||
noMessages: getIfNoMessages(state), | ||
}), | ||
boundActions, | ||
)(Chat); | ||
export default connectWithActions(state => ({ | ||
isOnline: state.app.isOnline, | ||
isFetching: getIsFetching(state), | ||
narrow: getActiveNarrow(state), | ||
noMessages: getIfNoMessages(state), | ||
}))(Chat); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,8 @@ | ||
/* @flow */ | ||
import { connect } from 'react-redux'; | ||
|
||
import boundActions from '../boundActions'; | ||
import connectWithActions from '../connectWithActions'; | ||
import { getUnreadCountInActiveNarrow } from '../selectors'; | ||
import UnreadNotice from './UnreadNotice'; | ||
|
||
export default connect( | ||
state => ({ | ||
unreadCount: getUnreadCountInActiveNarrow(state), | ||
}), | ||
boundActions, | ||
)(UnreadNotice); | ||
export default connectWithActions(state => ({ | ||
unreadCount: getUnreadCountInActiveNarrow(state), | ||
}))(UnreadNotice); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.