alejandrolacasa
5/28/2018 - 11:31 AM

[HOB - Good practices] #tips #hob

[HOB - Good practices] #tips #hob

Redux:

  • use children to get the children properties from a component to pass the to their children , eg: { children } = this.props.
  • isolate createStore in its own file. DONE
  • add local State type for each FeatureState.js

CSS:

  • use composes for adding multi classes.

HTML

  • don't use HTML tags without meaning (div, span) instead of this crate components with those tags inside.

Tests:

  • keep watch tests running in the background.
  • use snapshots test, use enzyme library for testing snapshots properly. Mock every single selector / service that is outside from the functionality that we want to test.
  • run just one test -> it(...) to fit(...)