Created
August 8, 2021 10:32
-
-
Save DJanoskova/baaa51448a38838f44ec2010d8bdecc0 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
| import { useEffect } from 'react'; | |
| import { useGetter } from 'vuex-but-for-react'; | |
| const PostsPage = () => { | |
| const posts = useGetter('posts'); | |
| return ( | |
| <ul> | |
| {posts.map(post => ( | |
| <li key={post.id}>{post.title}</li> | |
| ))} | |
| </ul> | |
| ) | |
| } | |
| export default PostsPage; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment