Skip to content
This repository was archived by the owner on Feb 18, 2022. It is now read-only.
This repository was archived by the owner on Feb 18, 2022. It is now read-only.

context is loose and deprecated cloneWithProps #12

Description

@cocodrino

Hi, I'm using baobab and my code works nice but today I was trying include react-shuffle and I notice than I'm receiving some errors

 Uncaught TypeError: Cannot read property 'createFacet' of undefined

I checked the error in google and end

github.com/Yomguithereal/baobab-react/issues/52

"this error occur because the rendered children has not access to the same context as set by your root component."

it's not so clear to me, context is a new (and not so much documented) feature and I can't understand how sort this problem

now, I also notice than you're actually using cloneWithProps which is the way suggested there

but seems than cloneWithProps is deprecated

now you can use https://facebook.github.io/react/docs/top-level-api.html#react.cloneelement which keep the ref

I'm not a react expert, so I can't understand so much about it.

I hope you can understand better the problem and can give me a clue about how solve it, thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions