Put in order · Vibe coding with Claude Code course · Module 5: Reddit clone

Sorting: The path of a new post

Order what happens after you click Publish in the form in r/TreasureHunting:

Items to put in order

  • filter computes the guild list together with the new post
  • React renders Feed again
  • onSubmit passes the post draft to addPost in Feed
  • handleSubmit blocks the page reload (preventDefault)
  • addPost appends the post at the start of the posts list

You can check the correct answer by solving this task in the CodeWorlds game.