-
-
Notifications
You must be signed in to change notification settings - Fork 481
[Tech] External React Dev Tools application #3765
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
Conversation
Co-authored-by: Flavio F Lima <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried this and it works fine, the only thing I noticed is that when I close Heroic the react dev tools window stays open and I have to also close it
it would be nice if it auto-closes when closing heroic
@@ -24,7 +24,20 @@ const electronViteConfig: UserConfigExport = { | |||
} | |||
} | |||
|
|||
export default defineConfig({ | |||
// FIXME: Potentially publish this as a dedicated plugin, if other projects | |||
// run into the same issue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does this mean? what is the issue this is fixing? would be nice to have that context so we know what to look for
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue this PR resolves is not Heroic-specific, it's something every Electron app will run into when trying to use the React dev tools. Because of that, every project will have to do something like this (adding a plugin to their bundler that adds the <script>
tag). Thus, it might make sense to publish just this small Vite plugin separately (instead of defining it in this config file), so everyone else can just install it instead of essentially copy-pasting this code
I doubt we can implement features like that into the React dev tools (at least not without modifying the package ourselves) |
Adopting #3302
Now that the Zustand PR is merged, this is the only thing missing to truly start battling the re-render issues :^)
Use the following Checklist if you have changed something on the Backend or Frontend: