npm install redux
npm install react-redux
import React from "react";
import ReactDOM from "react-dom/client";
import "./index.css";
import App from "./App";
import reportWebVitals from "./reportWebVitals";
import { Provider } from "react-redux";
import store from "./redux/store";
const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(
<Provider store={store}>
<App />
</Provider>
);
reportWebVitals();
let initialState = {
count: 0,
};
function reducer(state = initialState, action) {}
export default reducer;
import { createStore } from "redux";
import reducer from "./reducer/reducer";
let store = createStore(reducer);
export default store;