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

Request to Add React DevTool #52

Closed
ebfood opened this issue Jul 21, 2023 · 3 comments · Fixed by #53
Closed

Request to Add React DevTool #52

ebfood opened this issue Jul 21, 2023 · 3 comments · Fixed by #53

Comments

@ebfood
Copy link
Contributor

ebfood commented Jul 21, 2023

Description

Hello @invisal. I believe React DevTool is an essential tool for development in our project. During the recent development, I have actually been adding the DevTool locally each time, can we add React DevTool to the project?

My attempt

I tried electron-devtools-installer , which is already one of the project's dependencies and the recommended approach by the official documentation. However, this method didn't work: electron issue#36545

Currently, I'm using the workaround mentioned at react issue#25843, which involves temporarily downgrading my extension and loading it locally. However, before each commit, I need to revert the relevant changes.

Do you have any good solutions for this?

@invisal
Copy link
Collaborator

invisal commented Jul 21, 2023

@ebfood

I am not sure what is the best approach. One approach is to commit the extension that works and load that extension. I tried https://polypane.app/fmkadmapgofadopljbjfkapdkoienihi.zip

image

Then, we can load it

app
  .whenReady()
  .then(async () => {
    // Loading the ReactDev Tool
    await session.defaultSession.loadExtension(
      path.join(__dirname, '../../exts/reactdev')
    );
    
    // other code
  }

Not sure if this is good solution.

@ebfood
Copy link
Contributor Author

ebfood commented Jul 21, 2023

I think this is a good approach, maybe we can use it until upstream makes changes?

@invisal
Copy link
Collaborator

invisal commented Jul 21, 2023

@ebfood
#53

This is proposed solution. If you think it is fine.

@invisal invisal linked a pull request Jul 27, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants