Created
March 19, 2020 17:31
-
-
Save oshell/27b5fcc2d613761bd515ca5c0a67f3a4 to your computer and use it in GitHub Desktop.
Reactn Function Component
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 React, { useGlobal } from 'reactn'; // <-- reactn | |
import Card from '../card/card'; | |
const Cards = () => { | |
const [cards, setCards] = useGlobal('cards'); | |
return ( | |
<div> | |
{cards.map(card => ( | |
<Card key={card.id} {...card} /> | |
))} | |
</div> | |
); | |
}; | |
export default Cards; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment