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.

Option+Click doesn't work with material-ui components: "Couldn't find a React instance for the element"

See original GitHub issue

Describe the bug Option+Right-click works to open the context menu and then go to a selected component.

However, just Option+Click doesn’t do anything despite showing the green border around the hovered element. This appears to only be a problem with material UI styled elements.

To Reproduce This is a private product, so I can’t share any useful code. However, the problem might be with the fact that we use MaterialUI’s ("@material-ui/core": "^4.12.2",) makeStyles() for styling our components. That might mess up the logic for how you’re finding the target component.

Screen Shot 2022-05-11 at 10 21 54 AM

Expected behavior It should open the target component’s file in VSCode as desired.

Desktop (please complete the following information):

  • OS: MacOS
  • Browser Chrome
  • Version 101.0.4951.54 (Official Build) (x86_64)

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:2
  • Comments:6

github_iconTop GitHub Comments

2reactions
wojiangkuanglongcommented, May 23, 2022

Same problem, try to replace react.development.js and react-dom.development.js

0reactions
wojiangkuanglongcommented, Aug 13, 2022

Same problem, try to replace react.development.js and react-dom.development.js

@wojiangkuanglong Good evening. I am currently facing the same issue as @Lwdthe1. Could you please elaborate with which what I shall replace react.development.js & react-dom.development.js ? And where would i typically find these files?

Don’t use react.production(.min).js or react.profiling(.min).js, use react.development.js

Read more comments on GitHub >

github_iconTop Results From Across the Web

on change for Material UI Select component not triggered #322
According to this issue (#275), you should use the onClick event, not the onChange Event, but on reactstrap its not supported right now...
Read more >
React testing library on change for Material UI Select component
I grab the element using getByTestId which works great, then set the value of the element and then call fireEvent.change(select); but the ...
Read more >
Frequently Asked Questions - Material UI - MUI
Frequently Asked Questions. Stuck on a particular problem? Check some of these common gotchas first in the FAQ. If you still can't find...
Read more >
React Box - Material UI - MUI
The Box component wraps your component. It creates a new DOM element, a <div> that by default can be changed with the component...
Read more >
React Autocomplete component - Material UI - MUI
The autocomplete is a normal text input enhanced by a panel of suggested options. The widget is useful for setting the value of...
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