Created
November 24, 2017 08:31
-
-
Save iamdey/985f2f4d5229ceefe5b9d4fb6459b428 to your computer and use it in GitHub Desktop.
currentab
This file contains hidden or 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
import { createSelector } from 'reselect'; | |
import { connect } from 'react-redux'; | |
import { currentTabSelector } from '../store/selectors/tab'; | |
const mapStateToProps = createSelector( | |
[currentTabSelector], | |
currentTab => ({ | |
currentTab, | |
}) | |
); | |
const withCurrentTab = () => Component => connect(mapStateToProps)(Component); | |
export { withCurrentTab }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment