iamdustan / react-hardware

A React renderer for Hardware.
http://iamdustan.com/react-hardware
801 stars 41 forks source link

Cleaned up ReactHardwareComponent #7

Closed edvinerikson closed 8 years ago

edvinerikson commented 8 years ago
iamdustan commented 8 years ago

:tada: yay! You win the first contribution to React Hardware award!

Solid direction on these changes. A few tweaks (feel free to push back on them as well) and we’ll merge it in!

edvinerikson commented 8 years ago

I have updated the PR based on your feedback (thanks :D). Notably changes are the viewConfig, a eslint rule that I added and a checkRenderMethod function.

The viewConfig now have a EMPTY_VIEW_CONFIG and a GENERIC_VIEW_CONFIG instead of a DEAFULT_VIEW_CONFIG. I did this because I think it is wrong to pass the pin/generic config into everything we don't recognize. Right now I give anything that we don't recognize the EMPTY_VIEW_CONFIG which I think is a better approach.

The linting rule I added enforces object-curly-spaces to never occur (gives an error).

The reason I added the checkRenderMethod function is because in some cases we might not have a owner to reference to and if that is the case we don't have any reason to include that in the final message.

iamdustan commented 8 years ago

last nit, few new eslint errors to fix from that rule change, squash to one commit, and merging!

edvinerikson commented 8 years ago

Squashed and done. :+1: