Open
Description
HMR generally works fine. However, when I modify my index.js file, it doesn't reload the components defined within the file. Here's how to reproduce this behaviour:
- Create a new react app
- replace the index.js file
import React from "react"
import ReactDOM from "react-dom"
function Foo() {
return "first version"
}
ReactDOM.render(
<React.StrictMode>
<Foo />
</React.StrictMode>,
document.getElementById("root")
)
Load the page and you should see first version
Change the first version
string to anything else. The page doesn't change since the component doesn't get reloaded.