In the index.js file of the react js course, when it comes to import the component, it’s written:
import App from “./Container/AppFunction”;
However, the component name is AppFunction in the AppFunction.js file:
…
export default function AppFunction() {
…
}
I’m surprised that the code is still working. When I changed the ‘App’ to ‘AppFunction’, the code also works perfectly. What’s going on?!