Last active
October 5, 2015 14:16
-
-
Save rarous/842737c22a55bba62e31 to your computer and use it in GitHub Desktop.
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
const projects = company.get('projects', List()); | |
return ( | |
<PaperCard heading='Our Projects'> | |
<PaperCardContent> | |
{projects.map((p, i) => | |
<Project key={`proj${i}`} project={p} /> | |
)} | |
</PaperCardContent> | |
</PaperCard> | |
); |
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
const projects = company.get('projects'); | |
return ( | |
<PaperCard heading='Our Projects'> | |
<PaperCardContent> | |
{projects && projects.map((p, i) => | |
<Project key={`proj${i}`} project={p} /> | |
)} | |
</PaperCardContent> | |
</PaperCard> | |
); |
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
company.update('projects', List(), ps => ps.push(proj)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ten index v key je pěkně brittle. Reactu to zavře hubu, ale pokud seřadíš výsledky, nestane se nic v okamžiku, když p bude už existující.