Created
September 19, 2017 15:42
-
-
Save everdimension/bc65f869c2044db58340d711bc8b6c26 to your computer and use it in GitHub Desktop.
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
const ActuallyUsedComponent = () => ( | |
<div> | |
/* some layout and markup that doesn't depend on global state */ | |
<Connect mapStateToProps={mapStateToProps} mapPropsToActions={actions}> | |
/* some markup where the props from connect are actually needed */ | |
</Connect> | |
<Route | |
path="..." | |
component={() => ( | |
<div> | |
/* | |
* something that actually needs to be rendered for this path, | |
* usually you just provide a reference to a component | |
*/ | |
<Intl> | |
/* some markup that actually needs Intl */ | |
</Intl> | |
<Connect mapStateToProps={mapStateToProps}> | |
/* | |
* Another place where connect is needed, | |
* may be it even gets another state slice | |
*/ | |
</Connect> | |
</div> | |
)} | |
/> | |
</div> | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment