Skip to content

Instantly share code, notes, and snippets.

@davidrf
Last active June 29, 2016 19:11
Show Gist options
  • Save davidrf/bbc0bfeedb40b39fca384235566935e6 to your computer and use it in GitHub Desktop.
Save davidrf/bbc0bfeedb40b39fca384235566935e6 to your computer and use it in GitHub Desktop.

#System Check Review React

##Concepts to Know

  • ReactElements and JSX syntax
  • React Stateless Components
  • React Stateful Components

##Related Articles

  • Introduction To React
  • React Stateless Components
  • React Stateful Components

##Exercises to Review

  • Launch Academy FAQ

##Docs Check out the AJAX with jQuery docs here

  handleFormSubmit(event) {
    event.preventDefault();
    $.ajax({
      url: 'the url',
      contentType: 'application/json',
      method: 'GET/POST/DELETE/PATCH',
      data: JSON.stringify({ data: 'hi' })
    })
    .done((data) => {
      let newGrocery = {
        id: Date.now(),
        name: this.state.name
      };
      let newGroceries = [...this.state.groceries, newGrocery];
      this.setState({
        groceries: newGroceries,
        name: ''
      });
    });
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment