after using a react-native init project, its entry file is written as follows
import { AppRegistry } from "react-native";
import App from "./App";
AppRegistry.registerComponent("app", () => App);
this is normal and conforms to my understanding of react. But today, I can see in a project that it can be written like this:
import App from "./src/app";
const app = new App();
The export in app.js is not a react component, but a normal function. project address
I don"t understand why this piece can be written in this way., new App () has become an object.