Introduction

Render component is a new type of component (both in ComponentKit and Sections) that is based on a render method (similar to React and Litho) for creating its children.

  • The constructor creates the component only (vs the whole tree in non-render components).
  • The render method returns the component's child/children.
  • The state is provided by the infrastructure as a parameter of the render method (if needed), no more CKComponentScope.

Pros

  • Backward Compatibility - seamless integration with non-render components
  • Out-of-the-box Faster state updates optimization
  • Faster Props updates optimization
  • Simpler API (no CKComponentScope)
  • Better integration with CV2/Loom
  • Future additional optimizations on a framework level

Adoption

  • Please use Specs (ComponentKit Code Generation), which uses Render component under the hood.