Skip to content

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

Closed

Description

@wendux

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;

Activity

  1. grancalavera commented on Dec 29, 2020

    @grancalavera

    Seems related to #10254

  2. mcchong commented on Jan 4, 2021

    @mcchong

    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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions