Created
January 14, 2017 07:51
-
-
Save cellog/89bc5e37c1f1a01a6a2a0a3c9693eee0 to your computer and use it in GitHub Desktop.
conditional rendering based on data
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
import Camper from './Camper' | |
export default ({ year, ...otherData }) => { | |
return ( | |
<div> | |
{ otherData.year === year ? <Camper {...otherData} /> : null } | |
</div> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment