React Adopt is a small TypeScript library for composing multiple React render-prop components into a cleaner interface. It was created to solve the problem of nested render-prop callbacks, which can make React code harder to read and maintain. The library provides a simple adopt method that combines results from a mapper into a single render function. It supports use cases involving multiple render-prop utilities, React Context consumers, custom render handling, mapper-based prop shaping, and inline composition. At only about 0.7 KB minified, it is intentionally small and focused. It is most useful in older or render-prop-heavy React codebases that need a cleaner composition pattern without introducing a larger state-management abstraction.

Features

  • Render-prop component composition
  • Small 0.7 KB minified size
  • TypeScript-based implementation
  • React Context composition support
  • Custom render prop mapping
  • Inline Adopt component option

Project Samples

Project Activity

See All Activity >