initial setting
This commit is contained in:
20
com.twin.app.shoptime/src/index.js
Normal file
20
com.twin.app.shoptime/src/index.js
Normal file
@@ -0,0 +1,20 @@
|
||||
import { createRoot } from "react-dom/client";
|
||||
import { store } from "./store/store";
|
||||
import { Provider } from "react-redux";
|
||||
|
||||
import App from "./App";
|
||||
|
||||
let appElement = (
|
||||
<Provider store={store}>
|
||||
<App />
|
||||
</Provider>
|
||||
);
|
||||
|
||||
// In a browser environment, render instead of exporting
|
||||
if (typeof window === "object") {
|
||||
createRoot(document.getElementById("root")).render(appElement);
|
||||
appElement = null;
|
||||
window.store = store;
|
||||
}
|
||||
|
||||
export default appElement;
|
||||
Reference in New Issue
Block a user