Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support / better error logging for functional stateless children components #117

Closed
Zhang opened this issue Dec 20, 2016 · 4 comments
Closed
Labels
Milestone

Comments

@Zhang
Copy link

Zhang commented Dec 20, 2016

Portal will render child stateless children components
const PopoverMenu = ({...props}) => {
, but will trigger this error:
screen shot 2016-12-20 at 4 26 28 pm

The fix is to write your components like:
const PopoverMenu = ({...props}) => {

Unfortunately, this is very unintuitive to debug. It would be helpful to have better error messaging or general support around this issue

@tajo
Copy link
Owner

tajo commented Dec 29, 2016

Your sample code for problem and solution is identical?

@tajo
Copy link
Owner

tajo commented Dec 29, 2016

And yes, the support for functional components is iffy currently.

@Zhang
Copy link
Author

Zhang commented Jan 5, 2017

Oops - wrong paste, I had meant to write:

export class PopoverList extends Component {

@tajo tajo added the bug label Jul 29, 2017
@tajo tajo added this to the v4 milestone Jul 29, 2017
@tajo
Copy link
Owner

tajo commented Oct 1, 2017

Hey, please check the new major version of react-portal: #157

It's React v16 only since its uses the new official Portal API. There is the first beta released and I would like to get your feedback. I don't have bandwidth to maintain v3 which is very different and full of hacks.

I am happy to discuss this with v4 in mind. If this is still a problem, please re-open/update the issue. Thanks.

@tajo tajo closed this as completed Oct 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants