Skip to content

Instantly share code, notes, and snippets.

@wissalHaji
Created February 8, 2021 16:48
Show Gist options
  • Save wissalHaji/aeeecfaa1380223e3fb328b382a93276 to your computer and use it in GitHub Desktop.
Save wissalHaji/aeeecfaa1380223e3fb328b382a93276 to your computer and use it in GitHub Desktop.
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