Question · Vibe coding with Claude Code course · Module 5: Reddit clone
Quiz: Where to filter search
An agent called searchPosts in app/page.tsx and passed the filtered list to Feed as initialPosts. What will you see after typing a phrase and pressing Enter?
Answer options
- The results at once, because the server always has the current list of posts
- A build error, because searchPosts cannot run on the server
- An empty list, because Feed loses all posts from its state
- The address will change, but the list will still show all posts, because useState(initialPosts) takes its value only on the first render
You can check the correct answer by solving this task in the CodeWorlds game.