Created
February 8, 2021 16:48
-
-
Save wissalHaji/aeeecfaa1380223e3fb328b382a93276 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import ReactDOM from "react-dom"; | |
import App from "./App"; | |
import { DrizzleProvider } from "./drizzle/drizzleContext"; | |
import { Provider as ReduxProvider } from "react-redux"; | |
import options from "./drizzle/drizzleOptions"; | |
import { Drizzle, generateStore } from "@drizzle/store"; | |
import logger from "redux-logger"; | |
const store = generateStore({ | |
drizzleOptions: options, | |
appMiddlewares: [logger], | |
}); | |
const drizzle = new Drizzle(options, store); | |
ReactDOM.render( | |
<React.StrictMode> | |
<ReduxProvider store={drizzle.store}> | |
<DrizzleProvider drizzle={drizzle}> | |
<App /> | |
</DrizzleProvider> | |
</ReduxProvider> | |
</React.StrictMode>, | |
document.getElementById("root") | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment