import { configureStore } from "@reduxjs/toolkit";
import React from "react";
import ReactDOM from "react-dom";
import { Provider } from "react-redux";
import UI from "./UI";
import reducer from "~store/reducer";

const store = configureStore({ reducer });

export const createRoot = (elem: Element) => {
  ReactDOM.render(
    <Provider store={store}>
      <UI />
    </Provider>,
    elem
  );
};
