Releases: pedronauck/react-adopt
Releases · pedronauck/react-adopt
Initial release
Usage
import React from 'react'
import { render } from 'react-dom'
import { adopt } from 'react-adopt'
import { Filter } from './my-awesome-filter-component'
const Composed = adopt({
kids: <Filter list={people} by={p => p.age < 18} />,
adults: <Filter list={people} by={p => p.age >= 18} />
})
const App = () => (
<Composed>
{({ kids, adults }) => (
<div>
<ul>{kids.map(p => <li>{p.name}</li>)}</ul>
<ul>{adults.map(p => <li>{p.name}</li>)}</ul>
</div>
)}
</Composed>
)