From ac601c311208561368fdb3b113f3c99c25d14924 Mon Sep 17 00:00:00 2001 From: sa_yoshiii Date: Wed, 31 Aug 2022 09:44:04 +0900 Subject: [PATCH] =?UTF-8?q?Redux=20Toolkit=E3=81=A7Store=E3=82=92=E4=BD=9C?= =?UTF-8?q?=E6=88=90=E3=81=97=E3=81=A6=E3=81=BF=E3=82=88=E3=81=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/index.js | 22 ++++++++++------------ src/store.js | 5 +++++ 2 files changed, 15 insertions(+), 12 deletions(-) create mode 100644 src/store.js diff --git a/src/index.js b/src/index.js index d563c0f..51e7592 100644 --- a/src/index.js +++ b/src/index.js @@ -1,17 +1,15 @@ -import React from 'react'; -import ReactDOM from 'react-dom/client'; -import './index.css'; -import App from './App'; -import reportWebVitals from './reportWebVitals'; +import React from "react"; +import ReactDOM from "react-dom/client"; +import "./index.css"; +import App from "./App"; +import { store } from "./store"; +import { Provider } from "react-redux"; -const root = ReactDOM.createRoot(document.getElementById('root')); +const root = ReactDOM.createRoot(document.getElementById("root")); root.render( - + + + ); - -// If you want to start measuring performance in your app, pass a function -// to log results (for example: reportWebVitals(console.log)) -// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals -reportWebVitals(); diff --git a/src/store.js b/src/store.js new file mode 100644 index 0000000..d3a3e50 --- /dev/null +++ b/src/store.js @@ -0,0 +1,5 @@ +import { configureStore } from "@reduxjs/toolkit"; + +export const store = configureStore({ + reducer: {}, +});