Welcome to Memerator!
Start generating meme ideas by providing topics and intended audience.
{!!memes && memes.length > 0 ? (
memes.map((memeIdea) => (
Topics:
{memeIdea.topics}
Audience:
{memeIdea.audience}
{/* TODO: implement edit and delete meme features */}
))
) : (
:( no memes found
)}
);
}
```
There are two things I want to point out about this code:
1. The `useQuery` hook calls our `getAllMemes` Query when the component mounts. It also caches the result for us, as well as automatically re-fetching whenever we add a new Meme to our DB via `createMeme`. This means our page will reload automatically whenever a new meme is generated.
2. The `useAuth` hook allows us to fetch info about our logged in user. If the user isn’t logged in, we force them to do so before they can generate a meme.
These are really cool Wasp features that make your life as a developer a lot easier 🙂
So go ahead now and try and generate a meme. Here’s the one I just generated:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c2ypm9n0uyra47mp5g85.png)
Haha. Pretty good!
Now wouldn’t it be cool though if we could edit and delete our memes? And what if we could expand the set of meme templates for our generator to use? Wouldn’t that be cool, too?
Yes, it would be. So let’s do that.