All Questions
7,068
questions
-1
votes
0
answers
23
views
TypeError: Cannot read properties of undefined (reading 'numberOfCakes')
I am beginner to React and Redux
I am trying to learn Redux with React.
I have created a store in store.js as below -
const redux = require("redux");
const createStore = redux.createStore;
...
0
votes
1
answer
24
views
Redux reducer remove item from nested object state
I'm trying to remove an item from the state in a reducer after a successful api call to delete an item. I think the problem is that I am not removing the deleted item correctly. I tried a number of ...
1
vote
1
answer
27
views
'dispatch' is declared but its value is never read
'dispatch' is declared but its value is never read
this is the code where I'm using this:
actions/index.js
import { auth, provider } from "../firebase";
export function SignInAPI() {
...
-2
votes
0
answers
63
views
My entire page reloads after changing a state in react
So I have a website with a global state that I created using redux. This holds a list of every window there is. I have seperate state for the windows itself to track it's position and size on the ...
0
votes
0
answers
39
views
trouble updating images in editing user profile
Basically it is a social media app in which I'm trying to edit user profile pic and cover img by an input form and it is giving errors like not returning data after submitting the form, I'm using ...
-1
votes
3
answers
68
views
Unhandled Runtime Error RangeError: Maximum call stack size exceeded (Next js)
Please Help me, This is the error
error page
I get this error in some browsers (works on safari but not in other browser) after using the app for sometimes or immediately.
this is what my console ...
0
votes
3
answers
50
views
Updating my redux store with data from an Api on the click of a button
I tried updating the redux store of my application using a button but each time the button is clicked and the data from the api is mapped through, it doesn't update the store with the value as ...
0
votes
1
answer
51
views
react router loader shows null for localStorage item
i have a loader that redircts to an /authroize page whenever the user opens my page, this is the code for my loader:
export function redirectLoader() {
const data = localStorage.getItem("...
0
votes
1
answer
44
views
Why is my `amount` reading as undefined from my `createSlice`?
I have just started learning Redux with React so I apologize if it is something as simple as syntax. This project prompts me to use a variety of react-redux functions.
I have my slice below:
/** @type ...
1
vote
2
answers
48
views
How is my useDispatch hook set up incorrectly here?
I have just started learning Redux with React so I apologize if it is something as simple as syntax. This project prompts me to use a variety of react-redux functions.
I have my slice below:
/** @type ...
2
votes
1
answer
32
views
how to show textfield or 2 different component in react js?
I have two components in my demo application (Autocomplete and Text Field). I want to show only one component at any given time. The condition is that when the user uses SLASH (/), it will show the ...
-1
votes
2
answers
34
views
Rendered more hooks than during the previous render. about hide or show menu items
import navigationConfig from "configs/NavigationConfig";
import useAuth from "hooks/useAuth";
import useUserType from "hooks/useType";
const { SubMenu } = Menu;
const { ...
0
votes
1
answer
59
views
React component does not load redux state
everyone! I'm faced with the problem that my component is rendered twice. I found out that it happens because of using useEffect and useSelector at the same time, but I don't know how to fix it. I'm ...
0
votes
0
answers
37
views
React Testing Library Hook testing: userEvent.selectOptions not firing onChange event handler
userEvent.selectOptions actually selects the value i set but its not firing the event listener that updates a hook
this is the component
import { useEffect, useRef, useState } from "react";
...
1
vote
2
answers
59
views
Uncaught (in promise) TypeError: dispatch is not a function in connect
I am building a application with Redux, React-Redux, and React. When I am doing connect with component and making action call, I receive an error:
Uncaught (in promise) TypeError: sendLoginRequest is ...