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.

[bug] [16.5.0] shouldConstruct check

See original GitHub issue

Do you want to request a feature or report a bug? Reporting a bug.

What is the current behavior? With the recent change to shouldConstruct (https://github.com/facebook/react/commit/5031ebf6beddf88cac15f4d2c9e91f8dbb91d59d#diff-9ba7cab7f838d9f9071d2fb8ccbf48bfL282) the logic for checking the isReactComponent prototype property has become more strict. It turns out we are using a few dependencies that are defining a method called isReactComponent and this update caused these components to be treated as an IndeterminateComponent type internally.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn’t have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below: https://codesandbox.io/s/v3qw39wky

What is the expected behavior? It would be nice if React could recognize this case and maybe log an error in development. I’m happy to try implementing this if you want to go that route. People definitely shouldn’t be defining isReactComponent on their own components, but if it happens a quick check and an error message would make it a quick fix.

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React? Impacts only v16.5.0. It wasn’t an issue due to the less exhaustive check in earlier versions.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
awearycommented, Sep 6, 2018

A proper warning is what I had in mind. If it’s an established contract it seems like we should discourage users from shadowing it

1reaction
gaearoncommented, Sep 13, 2018

Should be fixed in 16.5.1

Read more comments on GitHub >

github_iconTop Results From Across the Web

VS 16.5.0 P1.0 How to avoid - The ... - GitHub
I can reproduce this error with my AndroidX test samples. Workaround for now: rebuild and then run . Sole run will cause this...
Read more >
Upgrading Microsoft.NET.Test.Sdk from 16.5.0 to 16.7.1 ...
I've tried deleting the pipeline and re-adding it, restarting our self-hosted build agent and trying a different repository (this is how we ...
Read more >
Could not resolve dependency error peer react@"^16.8.0
I had this error with Heroku deployment. So no matter what code you change, it will never run on your hosting server if...
Read more >
NuGet Warning NU1605 - Microsoft Learn
Learn about .NET SDK error NETSDK1045, which occurs when the build tools can't find the requested version of the .NET SDK.
Read more >
iOS Changelog - Airship Docs
Patch release that significantly speeds up SDK build time, fixes issues with automatic setup for SwiftUI apps, ... Apps running 16.5.0 should update....
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