Skip to content

Custom render and retrieving props from composed #20

@theKashey

Description

@theKashey

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions