Skip to content

Releases: gnapse/render-props-compose

Receiving named combined props

06 Feb 13:39
Compare
Choose a tag to compare

This release adds support for receiving the combined props in the render prop as a single object argument, instead of as a positional list of arguments.

You can achieve this by passing the components to compose in an object with the keys that correspond to them in the resulting combined props:

const App = () => (
  <Composed components={{ mouse: Mouse, timer: Timer, counter: Counter }}>
    {({ mouse, timer, counter }) => ( ... )}
  </Composed>
)

v0.1.0: Merge pull request #5 from gnapse/render-prop-name

05 Feb 21:11
a851f9d
Compare
Choose a tag to compare
Add support to customize the render prop name