fullstackreact / food-lookup-demo

A demonstration of using `create-react-app` with a server
MIT License
1.18k stars 372 forks source link

Rewrite App.js to use ES6 syntax #16

Closed markerikson closed 7 years ago

markerikson commented 7 years ago

Fixes #15

Improved readability and style of App.js using ES6 syntax:

Used React class component syntax instead of createClass Extracted callbacks as class methods instead of inline in JSX Used Class Properties syntax to define callback methods and initial state Used Array.filter to remove item instead of "double-slice" approach

acco commented 7 years ago

Thanks for your patience @markerikson, I've been heads down for the past few weeks.

This is really great! Super appreciative. I'm going to update the other components in this repo to match this style / the concerns you mentioned here.