question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

My ArcherElements are defined in another component, so I am getting "Could not find "unregisterChild" in the context of <ArcherElement>"

See original GitHub issue

I have a component that looks a little something like:

<MyApp>
  <ArcherContainer>
    <ThirdPartyComponent itemRenderer={() => (<ContainsArcherElement />)}
  </ArcherContainer>
</MyApp>

And then ContainsArcherElement is similar to:

const ContainsArcherElement = () => (
 <SomethingElse>
   <ArcherElement /> // with all the right props
 </SomethingElse>
)

But I’m getting the full Could not find "unregisterChild" in the context of <ArcherElement>. Wrap the component in a <ArcherContainer>. but it should be wrapped, just not immediately.

Is there a way around this, and is it a bug or a feature?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:20 (15 by maintainers)

github_iconTop GitHub Comments

2reactions
jfo84commented, May 14, 2020

@AncientSwordRage Context is not passed through into your render component, and React has no smart way to make that possible. The container could expose the context and you could manually pass it, but I don’t think that just works off the top of my head.

1reaction
jfo84commented, May 18, 2020

@AncientSwordRage Sorry, but I can only be so nice sometimes. When someone tells you that you’re confused and an idiot, and then goes on to reference a pull request that you contributed to as evidence, I’m going to tell them off. Engineers and their egos know no bounds.

The feature has to be added, but I can look into it later today.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Stripe reactjs - could not find elements context - Stack Overflow
My CardElement is wrapped in an Elements components so I'm not sure why I am seeing this error. reactjs · stripe-payments · Share....
Read more >
Advanced ways to write styled-components - Medium
Within the unordered list style, you will refer to the item and add a spacing style. Referring to another component. Switching the rendered...
Read more >
react-archer-element - npm Package Health Analysis - Snyk
Ensure you're using the healthiest npm packages. Snyk scans all the packages in your projects for vulnerabilities and provides automated fix ...
Read more >
How we implemented SVG Arrows in React: The Basics (1/3)
One of the important parts of our app is the roadmap. A roadmap helps you visualize your future work plan, and you can...
Read more >
The react-archer from pierpo - Coder Social
My ArcherElements are defined in another component, so I am getting "Could not find "unregisterChild" in the context of <ArcherElement>".
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found