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

docs: instructions for automatic HMR in react #6

Merged
merged 4 commits into from
Nov 7, 2023

Conversation

b-zurg
Copy link
Contributor

@b-zurg b-zurg commented Apr 17, 2020

This MR is inspired by this great solution electron/forge#1164 (comment) for adding HMR. I thought it was appropriate to put it in the docs as many will encounter this but not everyone would be using react.

This MR is inspired by this great solution electron/forge#1164 (comment) for adding HMR.  I thought it was appropriate to put it in the docs as many will encounter this but not everyone would be using react.
@mbret
Copy link

mbret commented Jul 22, 2020

Just tried and it works as expected. Havent tried on a big app so hard to say if there are unexpected behavior on the long run. 👏

Do you see any pitfall using it only once on the renderer and wrapping the App module ?

import { hot } from "react-hot-loader";
import './index.css';
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';

ReactDOM.render(<App />, document.getElementById('root'));

export default hot(module)(App)

@malept
Copy link
Contributor

malept commented Jul 22, 2020

This is blocked by #11

config/plugins/webpack.md Outdated Show resolved Hide resolved
config/plugins/webpack.md Outdated Show resolved Hide resolved
config/plugins/webpack.md Outdated Show resolved Hide resolved
@erickzhao
Copy link
Member

Thanks for this contribution!

@dsanders11 dsanders11 merged commit 38e081d into electron-forge:v6 Nov 7, 2023
1 check passed
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 this pull request may close these issues.

5 participants