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

react-scripts 4.0.1 hot reload bug ( but 3.4.3 works ) #10287

Closed
wendux opened this issue Dec 24, 2020 · 2 comments · Fixed by #11105
Closed

react-scripts 4.0.1 hot reload bug ( but 3.4.3 works ) #10287

wendux opened this issue Dec 24, 2020 · 2 comments · Fixed by #11105

Comments

@wendux
Copy link

wendux commented Dec 24, 2020

Describe the bug

import React, {useState} from 'react';

function Example(props) {
    return <div>{props.title}</div>
}

const ExampleNew = React.memo(Example, (prevProps, nextProps) => {
    // update here ,hot reload doesn't work unless refreshing the page in browser
    // console.log("2")
    console.log("1")
    return false
})


function App() {
    const [count, setCount] = useState(0);

    return (
        <div>
            <ExampleNew title={count}/>
            <button onClick={() => setCount(count + 1)}>
                Click me
            </button>
        </div>
    );
}

export default App;
@grancalavera
Copy link

Seems related to #10254

@mcchong
Copy link

mcchong commented Jan 4, 2021

Just upgraded to 4.0.1 from 3.something and have a bunch of weird behaviour re: hotloading. Can file a more detailed bug report when I have the time, but the page doesn't refresh on save anymore - is this a bug or a feature? Also sometimes I have to kill the tab on certain compile errors because the console get stuck spamming the errors...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants