All Questions
100 questions
0
votes
0
answers
93
views
TypeError: middleware is not a function using redux-thunk
enter image description here
I am learning react-redux and using reux-thunk for making api calls but i am getting error of
Type error : middleware is not a function
I am not able to understand the ...
0
votes
1
answer
27
views
Redux RTK req body not seen by the services
Im experimenting with Redux's RTK building a little Pokemon app.
In the app I want to add a pokemon to my pokedex by sending the pokemonID to an endpoint using "POST" method. When I use RTK, ...
0
votes
1
answer
92
views
Replit Node.js app Uncaught TypeError: Cannot read properties of undefined (reading 'apply')
Repo: https://github.com/jerzy-jarczynski/backend_rest_api_app
I'm trying to deploy an Express.js and React application on Replit. The application is working fine on localhost, and I can also see it ...
0
votes
1
answer
344
views
redux gets two errors in React.js
I want to create a cart for a shopping mall,
when I use the redux ,which always comes two errors(Problem A&B).
Problem A.
Warning: Invalid hook call. Hooks can only be called inside of the body of ...
0
votes
1
answer
54
views
JS function won't return a return
I am trying in Redux change state via action but when I try to fire up the action it won't return anything. I think there is SOME problem in return statement but not sure how it is. Everything before ...
1
vote
1
answer
2k
views
Stripe invalid_request_error: A token may not be passed in as a Source
I am trying to set payment method on my ecommerce site but the stripe is giving this error: A token may not be passed in as a Source. You can convert your token into a Source using /v1/sources with ...
0
votes
1
answer
400
views
nextjs with redux and APIMiddleware. Rendering before SUCCESS_TYPE
I'm migrating an older application to next.js and I am having issues with getServerSideProps awaiting my API calls. I am using the older APIMiddleware popular with early redux actions. Essentially, ...
-1
votes
3
answers
2k
views
remove product from redux shopping cart
Im trying to make a shopping cart using react redux. i can add products to my shopping cart but have no idea how to remove a product from my cart.
i tried to remove by splice method but it doesnt seem ...
1
vote
3
answers
1k
views
How to destructure redux state in react redux?
I am not getting the point of using ...in ...state. When I have watched a tutorial of react redux they mentioned that it is destructuring of state variable but can you explain me the point mentioned .
...
0
votes
0
answers
145
views
sequelize redux map doesn't working when I use findAndCountAll
when I use findAll like this:
try{
const brands = await Brand.findAll({});
res.status(200).json(brands);
}catch(err){
console.error(err);
}
redux tree likes:
brand: {
list: [
{
id: ...
1
vote
1
answer
306
views
Axios GET Request works in Postman but throws 400 error - Redux
I am working through a full stack project. So far, I have created a login and register which both work and they return a jwt web token. I am trying to make a GET request to (/api/profile/me) to get ...
0
votes
1
answer
56
views
MERN Redux TypeError: conversations.map is not a function redux
I have a component that needs to access state in a reducer.
When I call the useSelector to get the state, at first its an empty object, then about 3 seconds later, BAM data comes in.
I want to run a ....
0
votes
1
answer
61
views
I am getting the below error when I am trying to open a product from HomeScreen - Converting circular structure to JSON -->
when I click on a product from HomeScreen.js which should take me to the ProductScreen to show product details but I am getting the below error.
Converting circular structure to JSON --> starting ...
0
votes
3
answers
354
views
How can I pass an argument in GET method?
I am currently using Redux and I want to send the state and request it in the backend. Code below.
const { email } = useSelector((state) => state.user);
const getConcern = async () => {
...
2
votes
2
answers
5k
views
Redux Store set to null when refresh the page
Index.js
Redux Store
This is Redux store file where I am setting the details of the authenticated user by dispatching an action.
import { createStore } from "redux";
function reducerFunction(...