What are the features of Container/Smart components?

Technology CommunityCategory: React NativeWhat are the features of Container/Smart components?
VietMX Staff asked 3 years ago

Contaner components are:

  • are concerned with how things work.
  • don’t usually have any markup of their own except for some wrapping Views, and never have any styles.
  • provide the data and behavior to presentational or other container components.
  • call Redux actions and provide these as callbacks to the presentational components.
  • are often stateful, as they tend to serve as data sources.
  • are usually generated using higher order components such as connect() from React Redux, createContainer() from Relay, or Container.create() from Flux Utils, rather than written by hand.