mozilla / tofino

Project Tofino is a browser interaction experiment.
https://mozilla.github.io/tofino
Apache License 2.0
647 stars 68 forks source link

Make components "dumb" #8

Closed jsantell closed 8 years ago

jsantell commented 8 years ago

Extra reading: https://medium.com/@dan_abramov/smart-and-dumb-components-7ca2f9a7c7d0#.8e28rxk9a

Especially when using with redux, almost all of our components should be "dumb" -- that is, just take props and construct a DOM fragment. This includes handlers and the like, where our main container/app passes in all handlers necessary into its children components. This also will lead to easier testing due to having control over the props passed in, but also minimize the area in which we directly access electron methods in components.

jsantell commented 8 years ago

This should also include the accessing of browserDB

jsantell commented 8 years ago

https://github.com/mozilla/fawkes/pull/10

jsantell commented 8 years ago

https://github.com/mozilla/fawkes/pull/13

jsantell commented 8 years ago

https://github.com/mozilla/tofino/pull/34