Put in order · Vibe coding with Claude Code course · Module 5: Reddit clone
Sorting: The journey of a search phrase
Put in order what happens after you type "wreck" in r/PirateLife and press Enter:
Items to put in order
- app/page.tsx reads q from searchParams
- searchPosts keeps the posts with the word wreck, and sortPosts arranges them
- Form builds the address /?community=pirate-life&q=wreck from the form fields
- Next.js navigates to that address without reloading the page
- Feed receives the phrase in the query prop
You can check the correct answer by solving this task in the CodeWorlds game.