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.

parentComponent must be a valid React Component after upgrading to 1.1.0

See original GitHub issue

Coming from Overlay.js.

Solution: do not upgrade to 1.1.0 when using React 15.

It did not immediately occur to me that version 1.1.0 depends on React 16. And because my package.json states "react-materialize": "^1.0.6", it automatically updates to new minor versions (which should not contain breaking changes). This caused my project to break with this error.

Shouldn’t the major version be upped to reflect this breaking change? Or is there a way to not automatically update to versions which require a higher version of React?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
EtiennePeeterscommented, Dec 5, 2017

Thanks! Fortunately I can upgrade to React 16, so that obviously solves the problem also. But others might not be so fortunate.

It is an error.

The error in overlay.js is triggered by just rendering a Modal. I do not use Overlay myself. MyModal.jsx:

render(){
    return(
        <Modal header={'header'} trigger={<Button>trigger</Button>}>
            content
        </Modal>
    );
}

1reaction
alextrasterocommented, Dec 5, 2017

You are absolutely correct. I checked the components but couldn’t find anything broken, that’s why I opted for a minor. I’ll have a look at this ASAP

Read more comments on GitHub >

github_iconTop Results From Across the Web

Upgraded to React v16, seeing Error: parentComponent must ...
I added a new component to my project via a private NPM package. It has the following dependencies as indicated in my project's ......
Read more >
Components and Props - React
This function is a valid React component because it accepts a single “props” (which stands for properties) object argument with data and returns...
Read more >
Use React.memo() wisely
1. React.memo(). When deciding to update DOM, React first renders your component, then compares the result with the previous render. If the ...
Read more >
When do components update? — reagent 1.1.0 - cljdoc
reagent: A simple ClojureScript interface to React Documentation for ... Answer: when the parent Component re-renders, and supplies a new value as the...
Read more >
react-currency-format - npm
React component to format currency in an input or as a text. ... representation of numbers (unformatted) then this should be passed as...
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