pedronauck/react-adopt

Custom render and retrieving props from composed

theKashey opened this issue · 0 comments

This example

import { adopt } from 'react-adopt'
import { Value } from 'react-powerplug'

const Composed = adopt({
  value1: <Value initial={1}>{render}</Value>,
  value2: <Value initial={2}>{render}</Value>,
})

will work perfectly, while this -

const Composed = adopt({
  value1: ({ value1, render }) => <Value initial={value1}>{render}</Value>,
  value2: ({ value2, render }) => <Value initial={value2}>{render}</Value>,
})

Will not. Result will contain value2, but any sight of value1 will lost.