365体育足球滚球比分

Questions tagged [redux]

Redux is a predictable state container for JavaScript applications based on the Flux design pattern.

Filter by
Sorted by
Tagged with
0
votes
0answers
9 views

Store multiple values in Redux Store using ReactJS

I want to store multiple values in redux store based on user logged in, I am using below code on my login screen : I want to store emp_id(string) and isValidCE(boolean) values to redux store. import ...
0
votes
0answers
5 views

Saving selected options React-Redux

I have an Component with selected options like size and type. I want to pass this selected options as props to another Component. I save the active options using hook useState(). May be I need to ...
0
votes
0answers
17 views

Why my component is re rendering multiple times and also did mounted when i submit the form

Home.JS class Home extends Component{ state = { serverPosts:null, offlinePosts:[], isLoading:false, isError:false, error:null } componentDidMount(){ console.log("home ...
1
vote
2answers
17 views

Adding existing item to Cart (React-Redux)

I'm using React and Redux for creating shop. I need to add existing item to cart with increasing quantity. I know, that Redux is based on immutability, but I can't find how to get rid of mutation. ...
0
votes
0answers
8 views

RTK createAsyncThunk state in reducer is a promise

I have the following slice: import { createSlice, createAsyncThunk } from '@reduxjs/toolkit' export const fetchUserById = createAsyncThunk( 'reqres', async (userId, thunkAPI) => { let ...
-1
votes
0answers
28 views

React redux - best way of accessing state through nested components

I've got a ProfileScreen component that fetches data from the redux store using useSelector(). It then passes the data from the store to it's child component ProfileInput via props. I have a useEffect ...
0
votes
1answer
13 views

How can I use notistick/(any snackbar) with redux-toolkit and react?

I want suggestion where and how should I write my snackbar, so it should give notification if data is fetched or if any error occurs while fetching. There are many example for the same, but my case is ...
0
votes
1answer
20 views

Move repetitive logic in reducers to utility function

I have been trying to write some codes in redux reducers where the logics of state updating are similar. My initial state looks like this: const initialState = { isLoading: false, events: [ { ...
0
votes
2answers
18 views

How to get classname or props from NavLink to use with google tag manager with react and redux in a stateless functional component?

Pretty new to both react, redux and gtm. I am trying to use google tagmanager and I have a navbar where I want to get the classname of every NavLink in a variable so I can send it along my gtm-event. ...
0
votes
0answers
10 views

Jest Enzyme Simulate Not Working In Redux Connect Hooks [closed]

I use Redux with React Native Hooks, before using the redux File test to simulate smoothly, but after I use Redux it provides an error in unit testing. Here is the Wrapper code: import { Provider } ...
0
votes
1answer
28 views

Filtering array by ISODate by Month in nodejs and express

given this array of objects: [ { "name": "Fixflex", "description": "Duis mattis egestas metus. Aenean fermentum. Donec ut mauris eget massa tempor ...
0
votes
2answers
51 views

Why my particular useEffect hook didn't run when deps changed

I try to control my app in song's play/pause with a state in redux name isPlaying,and when my current song's id change,fetching data and dispatching a action to change the detail information,I want ...
1
vote
1answer
25 views

My async actions endlessly called in my react redux toolkit slice

My Redux-async function endlessly called and hangs my system when i subscribe to the store using useSelector. My Product.Slice import { createSlice } from '@reduxjs/toolkit' import { ...
0
votes
1answer
10 views

React Native Formik use with react redux (ReferenceError: Can't Find Variable: title)

I suspect I'm having a problem with my onSubmit function. The error stated above is what I encounter when I run the application. I have tried to change my onSubmit function to take "title" ...
0
votes
1answer
18 views

Access Next.js client state on the server

I'm trying to fetch dynamic data in my Next.js app using the getServerSideProps function. The request must contain a token, which is stored client-side, to authenticate the user on the backend. I've ...

15 30 50 per page
1
2 3 4 5
1698