Skip to content

Instantly share code, notes, and snippets.

@DJanoskova
Created August 8, 2021 10:32
Show Gist options
  • Select an option

  • Save DJanoskova/baaa51448a38838f44ec2010d8bdecc0 to your computer and use it in GitHub Desktop.

Select an option

Save DJanoskova/baaa51448a38838f44ec2010d8bdecc0 to your computer and use it in GitHub Desktop.
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