React

Conventions

  • One-way data flow
  • Single state obj
  • setState
  • render
  • handleEvent

Patterns

Display loading indicator until child component(s) have rendered

  • Include child loading indicator component (render until data is loaded)
  • For web, use CSS to hide loading indicator component if is not the only child:
.parent .loading-component:not(:only-child) {
  display: none;
}

Published