Open AAdewunmi opened 7 months ago
Can I try to solve this bug?
Yes you can ...
Issue fixed! If you are having issues with Redux createStore() being depreciated, here's how to use configureStore():
Run on server side console ->
npm install @reduxjs/toolkit
yarn add @reduxjs/toolkit
Include configureStore() in your client/src/index.js file
import React from "react";
import ReactDOM from "react-dom";
import { Provider } from "react-redux";
// import { createStore, applyMiddleware, compose} from "redux";
// import thunk from "redux-thunk";
import { configureStore } from "@reduxjs/toolkit";
import reducers from "./reducers";
import App from "./App";
import "./index.css";
// const store = createStore(reducers, compose(applyMiddleware(thunk)));
const store = configureStore({ reducer: reducers });
ReactDOM.render(
<Provider store={store}>
<App />
</Provider>,
document.getElementById("root")
);
Job done!
https://github.com/A-bhiSheKumar/collegiateVoice
I shared my link to that repo with you. Please check it out.
Hi, Form isnt sending post data (creator: '', title: '', message: '', tags: '', selectedFile: '') to mongodb. From console log, I can see the post request being fulfilled but the array is empty and mongodb hasn't received the post data. I've got my /3000 & /5000 servers running without error and mongodb cluster is running. Any suggestions for a fix? Thanks.
/api/index.js
/actions/posts.js
/Form/Form.js
/reducers/posts.js