humanmade / hm-handbook-theme

HM Handbook Theme
http://handbook.hmn.md
39 stars 9 forks source link

Refactor search to use react #41

Closed mattheu closed 8 years ago

mattheu commented 8 years ago

Refactor existing search component to use React.

Not sure why I didn't write it like this to begin with. I think it was because I wasn't sure about using react to augment an existing component. However I think it's nice to keep the code in the theme a bit more consitent and its much neater now.

Couple of queries.

pdewouters commented 8 years ago

Just a few comments, might be worth considering this library for the class name logic https://github.com/JedWatson/classnames

I usually use const for declaring variables that won't get reassigned, and let in other cases

mattheu commented 8 years ago

Thanks for your review. Some good pointers on ES6. And I think the className library could be useful.

mattheu commented 8 years ago

Think i've hit all of these things. I'm going to go ahead and merge!