Changelog
- Add support to pass a component as mapper value
- Hoisting non-react statics methods from mapper value to Composed component (thanks @russelh15)
import { React } from 'react'
import { adopt } from 'react-adopt'
import { Value } from 'react-powerplug'
const Greeter = ({ render, name }) => render(`Hi ${name.value}`)
Greeter.sayHi = (name) => `Hi ${name}`
const Composed = adopt({
name: <Value name="John" />
greet: Greet
})
console.log(Composed.sayHi('John')) // Hi John
const App = () => (
<Composed>
{({ greet, name }) => /* ... */ }
</Composed>
)