querymx / querym

Querym is free, open-source and cross-platform MySQL and PostgreSQL GUI client.
https://querym.net/
GNU General Public License v3.0
94 stars 28 forks source link

Request to Add React DevTool #52

Closed ebfood closed 1 year ago

ebfood commented 1 year ago

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 commented 1 year ago

@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 commented 1 year ago

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

invisal commented 1 year ago

@ebfood https://github.com/invisal/query-master/pull/53

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