Skip to content

Instantly share code, notes, and snippets.

@noahpeden
Forked from joshuajhun/grocery-list.md
Created December 12, 2016 20:05
Show Gist options
  • Select an option

  • Save noahpeden/71cf1fe5331b9ab0a10e73e35c2f7fe8 to your computer and use it in GitHub Desktop.

Select an option

Save noahpeden/71cf1fe5331b9ab0a10e73e35c2f7fe8 to your computer and use it in GitHub Desktop.
Build a grocery list!

Grocery List

Today you are going to be tasked with building a small app that will hopefully help build / solidify some of your react chops.

The app should allow the user to add grocery items to a grocery list. A user should be able to add a grocery list item to the list via an input field and view each grocery list item on the dom.

This exercise is for your growth! If you're dependent upon previously written code you are essentially robbing yourself from your growth opportunity. I challenge you to try and critically think through these problems yourself. If you are completely stuck then ask for help from a peer, if you're still stuck look at your code.

Phase 0

  • There should be an input field
  • There should be a submit button
  • There should be a 'grocery list' section

Phase 1

  • The user should be able to type a list item into the input field

    • as the user types into the input field the application's state should change based on the value of the input field
  • When the user clicks the submit button it should add the item to the grocery list portion of the dom

Phase 2

  • each list item should have a delete button
  • when the delete button is clicked it is deleted from the dom
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment