Most voted "redux" questions
Redux is a state container for Javascript applications, based on the Flux application architecture.
Learn more…67 questions
Sort by count of
- 
		4 votes2 answers86 views"Child already has a Parent, it must be Removed first" when sending new object to ReducerI have a table where I want to sort your data. The table is copulated through the values of this useSelector() const users = useSelector(state => state.userStates.users) When the user clicks on… 
- 
		3 votes1 answer370 viewsHow to validate an array if it has objects inside it or not? React JSI have a code made using React JS and it works like this, I have a select component, and this is reused several times and the information it receives always comes from an array, only now I need to… 
- 
		2 votes2 answers407 viewsHow to fire a Redux Action without a ReactHi, I’m creating a Interceptor to the Xios which, if my Answer case there is an error with the status Forbidden (403) the same need to trigger the Action that starts the user’s logoff to force him… 
- 
		2 votes1 answer2373 viewsError: Module not found: Can’t resolve 'React-Redux' inWhen I try to run the application through yarn returns the following error: I reinstalled the package yarn add react-redux and npm install --save redux Page code that is giving error: import React,… 
- 
		1 votes1 answer2549 viewsHow can I change the state of an array item in React NativeI have a list that is loads after the return of the api, this list populates a Flatlist. By clicking on any item I would like to mark it with the status that was viewed: user How can I change only… 
- 
		1 votes1 answer579 viewsWhy use Redux to request the API in React?I started to see React well before learning how to use Redux and always requested in the API using a Fetch or Axios in the component itself. Today I already venture into the world of Redux and come… 
- 
		1 votes1 answer653 viewsWhen to use Redux and state in ReactI realized that we can use Redux and State to work on React. When to use one or the other? 
- 
		1 votes1 answer480 viewsReact using Redux, not saving application statusI’m trying to implement redux in my app Web react, does not give any error but also does not work, when I try to capture state is as undefined structure: App.js Routes.js store/actions.js… 
- 
		1 votes1 answer172 viewsRecover item index in list to deleteI’m trying to make a demo application for bookmark registration (Bookmarks). I can retrieve in a list what I type in the 3 inputs I have on my screen (Description, URL and tag), and I can include as… 
- 
		1 votes1 answer73 viewsHow to update Redux’s global status in an React application after posting to the API?An React form that you enter with name and text. The application uses Redux global state, it pulls an Axios API and posts to the API with the form data. When I do a new post I want to update the… 
- 
		1 votes1 answer172 viewsReact - Redux, how can I modify a complex object?I am trying to modify some properties of an array through an index coming from mine payload. The code below goes through the array looking for the index and tries to modify its properties. This even… 
- 
		1 votes0 answers233 viewsProblem with actions in reduxsauceI’m making a simple revenue registration app in React Turn on and I’m using Redux with Duck Pattern and reduxsauce, follow the code: //DUCK DE RECEITA import { createActions, createReducer } from… 
- 
		1 votes0 answers228 viewsRun Redux Saga on startupI created an offline app first to perform offline actions and send when online, and it works fine, but when the app closes and restarts the action queue does not perform because whoever checks the… 
- 
		1 votes1 answer47 viewsHow do I know whether or not to update a component?I’m using the React, React Native and Redux to make an app. I tried to study a little about the life cycles of a component but ended up getting confused about the various options present when… 
- 
		1 votes1 answer174 viewsReact, Redux, Mobx] What is the best way to manage status with paging?I use mobx, and now also Hooks, to manage application status (if using Redux would face the same problem), and couldn’t find a better way to manage paginated listings. If I have a list in the global… 
- 
		1 votes0 answers35 viewsHow to manage the state of a variable without calling the APIWith the reducer: import { HIDE_MENU, ESTADO_MENU } from '../actions/types'; const initialState = { open: true } export default function (state = initialState, action) { switch (action.type) { case… 
- 
		1 votes0 answers224 viewsReact: Uncaught (in Promise) Typeerror: Dispatch is not a FunctionHello, For some reason I make a call and I get the desired return, but it gives an error of Dispatch, I’ve tried several things and nothing works. My action: export const formulariosExternos =… 
- 
		1 votes0 answers35 viewsReact Native - Redux or Context API, how and why?Hello, my code he needs to send a text to another screen, according to the checkbox that is marked. The message that should be sent to another screen must be the one in which had the highest "grade"… 
- 
		1 votes0 answers31 viewsDoubt about the Redux-React storeI have three rooms: import { combineReducers } from 'redux'; import formularios from './formReducer'; import userLogin from './userReducer'; import errorReducer from './errorReducer'; export default… 
- 
		1 votes1 answer583 viewsReact-router <Redirect> does not workI’m doing an application in React and I want to make a check, if the guy is authenticated, redirect directly to Home, if not, goes to the Login screen, this is the Code: userReducer.js const… 
- 
		1 votes1 answer82 viewsWhat is the best practice in using Redux for small projects?Good night. I am starting a project in Reactjs an ERP Web containing basic registrations of people, products, orders. I will use Redux for the benefits of state sharing between the components, but… 
- 
		1 votes1 answer50 viewsReact/Redux - Function connectionHello! I have a file containing a single function, it should return a boleano from a condition using the data from the Redux Storage. I can connect the file without being a Reactcomponent to Redux?… 
- 
		1 votes0 answers80 viewsRedux Hooks Reactjs - Trying to create a structureI’m trying to create a login structure using Redux and Hooks in React.js. But I’m having an error that I’m not being able to understand why. Who knows good Javascript can help me. The reference… 
- 
		1 votes0 answers26 viewsReact Redux: How do I map two objects to each correctly rendered child component using mapStateToProps and mapDispatchToProps?A child component is rendered by map in the parent component... Via props, in the child component, I receive two objects and I would like that data to be rendered in the right component that is… 
- 
		1 votes0 answers53 viewsReact and Redux, call with Dispatch to re-loop causing class-based componentMy application combines React and Redux I have a class-based component called Login.js, a Slice called settingsSlice.js, and I’m using connect to access the state of that component. My files:… 
- 
		0 votes2 answers77 viewsReact Redux initStateIt’s common when you work with Redux set an initial state, example: const initState = { pagInicial:1, pagAtual:1, maxLinks:2, maxReg:5 } So far so good. Now and when I need an initial state,… 
- 
		0 votes1 answer178 viewsRun function managed by ReduxMy app React Native is managed by Redux. I need to perform the function _verificaLogin() coming by connect automatically when my app is rendering. The way I did it’s not working, I think the props… 
- 
		0 votes2 answers1964 viewsHow to delete an element by Key in React?This is the code generated, because the list is created by the routes of the pages, I would like to know a way to delete a specific Navlink, either by key or otherwise definitely, this Navlink… 
- 
		0 votes1 answer121 viewsIs it possible to fire two types of action at Redux at the same time?I’m using Redux and Redux-saga in an application with React and with doubt when it comes to displaying the load to the user when a saga is launched. I don’t know if this is good practice, but I was… 
- 
		0 votes0 answers150 viewsDelete child node in firebase with React-Native and ReduxDoes anyone know how to delete an item from a Listview in React-Native using firebase as a database? In case I want to delete only the item marked in the print below:… 
- 
		0 votes1 answer78 viewsHow to remove an item dynamically from an object?I’m using a state of reducer, containing an object in this format: x = {10: {nome: 'lucas'}, 20:{nome: 'beraldo'}} <br/> And, I get an id via action. I’d like to do something like… 
- 
		0 votes0 answers22 viewsReact&redux - Feathers-Rematch snapshotPlugin errorI am assisting in the development of an "APP" using Reactjs and Redux, Feathersjs... The whole project runs 100% on the Mac, but when you do git pull and run on Windows the project has a snapshot… 
- 
		0 votes1 answer1519 viewsError: "Uncaught Syntaxerror: Unexpected token import" in javascriptgood afternoon, I have the following program: testing.html: <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title> Testando </title> </head>… 
- 
		0 votes1 answer527 viewsCallback with Redux-thunkI’d like to know how to get a call back from dispath something like this, this with React: this.props.store.dispatch(dados, result => { console.log(result); }); On this line above the console.log… 
- 
		0 votes1 answer2051 viewsDifference and good practices, either global or React Native contextI’m new to React Native and would like to understand in an objective way: What’s the difference between using global.variavel = foo; or create a context api? 'React recently implemented Context Api… 
- 
		0 votes0 answers38 viewsDispatcher does not recognize payload React Native ReduxWhen trying to save a new state in the Redux store it says that such a variable does not exist. Dispatcher (where it points to error): export const valorMdoisD = () =>{ return{ type: ALIGN_M,… 
- 
		0 votes1 answer203 viewsReact Native only works with 2 clicksIn this code, the function only works after being called twice. ubernehmen = () => { this.setState({wert: ((this.state.cor*208)+(this.state.letra*8)}) this.setState({werta:… 
- 
		0 votes1 answer164 viewsRedux, how to access store state variables in functionsHi, my question is if I can access store variables in functions, something like: --usuarioReducer.js-- const initialState = { usuario: {}, isAuth: false } --root.js-- import { Redirect } from… 
- 
		0 votes0 answers10 viewsIn which cases do I want to use mapDispatchToProps or mapStateToProps from Redux?I looked in several places to know the difference between the two but found no place that could explain me clearly. reduxasked 4 years, 11 months ago Eduardo Gomes Heleno 1
- 
		0 votes2 answers676 viewsPersist currentUser firebase with React NativeThis function is triggered by clicking the Login button: export const loginUser = ({ email, password }) => { return (dispatch) => { dispatch({ type: LOGIN_USER });… 
- 
		0 votes1 answer603 viewsHow to get the status of a React within a React NativeHello, I’m new to React Native and I’m having problems to pass the status of a Reducer to a component I made. the same is as follows: import React from 'react' import { connect } from 'react-redux'… 
- 
		0 votes1 answer863 viewsReact Native error: Undefined is not a FunctionI’m having a bug in React React Native error: Undefined is not a Function import React, { Component } from 'react'; import { View, Text, StyleSheet } from 'react-native'; import { connect } from… 
- 
		0 votes0 answers40 viewsRedux with multiple application instancesIf Redux maintains a single component state and I have multiple instances of the application being used by multiple users, this means that users will view the same state in components? How to solve… 
- 
		0 votes2 answers1146 viewsHow do I pass the value to: "this.props" - React NativeI started studying React Native in version 0.55.4, and it seems to have changed a few things in the most current version (0.59.8), now I’m having difficulty passing/assigning values in the… 
- 
		0 votes1 answer144 viewsError trying to export a constant in ReactI have created this: const funcionarioReducer = (state = [], action) => { switch(action.type) { case 'ADD_FUNCIONARIO': return state.concat([action.data]); default: return state; } } export… 
- 
		0 votes1 answer25 viewsComponent is not being renderedIn my app.jsx file I have the import of the component "activities": import React from 'react' import { Container } from 'semantic-ui-react' import atividades from '../atividades/atividades' export… 
- 
		0 votes0 answers31 viewsIs it possible to create a handleChange for a form that takes the values of a Redux store?Next, I’m creating an app and came across this problem: I have a store set and want to create a data update form in Atlas (Mongodb). But I want this form, already come with the values that are in… 
- 
		0 votes1 answer970 viewsUsedispatch() inside a useEffect() -> *Missing dependency*ALERT: React Hook useEffect has a Missing dependency: 'Dispatcher'. Either include it or remove the dependency array React-Hooks/exhaustive-deps import React, {useEffect} from 'react' import… 
- 
		0 votes2 answers915 viewsError "Property 'REDUX_DEVTOOLS_EXTENSION_COMPOSE' does not exist on type 'Window & typeof globalThis'."?When configuring Redux Devtools I get the following Typescript error: Property 'REDUX_DEVTOOLS_EXTENSION_COMPOSE' does not exist on type 'Window & typeof globalThis'. store ts. import {… 
- 
		0 votes1 answer199 viewsReactjs and Redux state does not changeGood afternoon guys I’m beginner and I’m having a problem when it comes to updating my state could help me or give some hint on how I can fix this Home js. import React from 'react'; import {Form,…