Questions tagged [react-redux]

Official React bindings for Redux

0
votes
1answer
15 views

Redux-Thunk unable to get props in component

I have an application with firebase connected. I am able to at each step console log and get see the data from firebase being passed around however when im in the component level it always returns ...
-2
votes
0answers
14 views

No store found. Make sure to follow the instructions

No store found. Make sure to follow the instructions. code ... https://iamsapankumar.blogspot.com/2019/05/constantstype.html
0
votes
1answer
19 views

How do I loop Through a MongoDB Array with React JS to Render a Table?

In my MERN application, I am trying to create an admin dashboard component. This component will show a table with user information. The information is pulled from a MongoDB collection and then ...
0
votes
0answers
7 views

Binding redux form input.value to a datetimepicker

I have a react native/redux/redux form setup which is (mostly) working, so everything is hooked up and running. When I set up a form with an asynchronous update, I get a date field, for which I ...
0
votes
0answers
11 views

Why my getRequest() in saga doesn't see data from json.db after postRequest

My saga.ts : export function* postSomething(object:object){ yield postRequest(object); const Objects=yield getRequest(); console.log(Objects); yield put(showObject(...
0
votes
0answers
24 views

Component not updating after action is dispatched - react-redux

I'm using react-native and am having an issue where my action is being dispatched and the reducer is modifying the state, however my component is not re-rendering. My reducer is using the spread ...
1
vote
0answers
41 views

React search and filter methods issue

I'm working on a component that should be able to: Search by input - Using the input field a function will be called after the onBlur event got triggered. After the onBlur event the startSearch() ...
0
votes
0answers
12 views

ReactJS i18n connection - TypeError: locale.get is not a function

I'm trying to set up an app that can be accessed in 2 languages. I'm following another app's code and it is exactly as there, just that mine has an error: TypeError: locale.get is not a function ...
0
votes
1answer
32 views

How to print props object in JSX, i am getting TypeError: Cannot read property of undefined

I am trying to print the value of props in my JSX,even though the logs show the object when i try to print individual objects it throws error TypeError: Cannot read property <'objects'> of ...
0
votes
0answers
24 views

local-storage resets state id's so they override redux store objects

Below you can see how I have it structured in my state and redux store. I have state variables that counts when I add and delete an object, so that it knows at what index the next should be put at. ...
1
vote
0answers
35 views

Redux Action is not been dispatched

I am working on a react - redux application. Now I faced an issue to dispatch the action. The following code cannot dispatch the generateReport action. import React, { Component } from "react"; ...
0
votes
1answer
25 views

How to delete a specific item from a complex data structure while preserving the state in React-redux?

My current state structure looks something like this: //state { datasets:[ { sessions:[] }, {}, {} ] } Initially the datasets are displayed on a table. Once you select a specific ...
0
votes
1answer
36 views

React component not updating on changes to map (data structure) in redux state store

I've a map stored in redux state store and a react component which renders the values that I've stored in the map. Now when I'm adding/removing values from this map, my react component does not update ...
0
votes
1answer
23 views

Child component not re-rendering after state change in Promise..?

I have a function within a react child component that makes a HTTP post request. In its response I've used this.setState and this.forceUpdate however the component does not re-render. I've used this....
0
votes
0answers
30 views

Dynamic form field is render with previous value in react

I am trying to create dynamic options using redux-form, What i have done so far is ,i have created a object as an array of objects in state named as options, now i am able to create and delete ...
3
votes
1answer
33 views

Multi User login authentication | React Redux

I have an application with multi user login functionality. Now, I created the redux store for the login function. If User logged in, based on their type, it will redirect to the particular dashboard. ...
0
votes
0answers
25 views

How to keep users on the same page after refreshing with react-router-dom

I have a project where a user have login to his dashboard, after user logged in he can navigate to certain pages (links) An example of the pages he can visit is: Profile -View profile -Edit ...
2
votes
1answer
49 views

How to initiate a data fetch in a paging control (on initial load and when user pages through data)

In an app with react, redux, and redux saga, where is the best place to put code which initiates a fetch of data, especially in a component which includes paging (and where that data for the current ...
0
votes
2answers
52 views

Updating object in nested array, react-redux

I'm trying to update the objects that is in the nested array, below is an example of my state. I am trying to update the objects within goals I succeed with updating the objects. BUT Each time I ...
1
vote
1answer
22 views

How to send component's state as payload to store

I am new to Redux so I might have missed this part somewhere. I have a React.Component and a redux-saga store with actions START and STOP. What I'm stying to do is to send Component's state as ...
1
vote
0answers
20 views

How to get a textbox value change present in Header in all components in Next JS

I am new to Next Js, just implemented a basic project,, and starting with a new one. In project I have a header like this: In this header, I have a react-google-autocomplete to search and select a ...
2
votes
3answers
68 views

How to reload page after navigating from another screen

// I am using below code for navigating one screen to another i.e Home page . But when am navigating home page , I have to refresh the page ..reload . In current , when i am coming to home screen non ...
0
votes
0answers
50 views

Redux Sagas, Put Same Action In Parallel Multiple Times

How can I put the same action type multiple times in parallel, and be able to take all the responses? In Redux's documentation, they use call, and all to make API calls in parallel, but from what I'...
0
votes
0answers
33 views

nested component can't get props through connect

I am using a connected component as a props passed to a parent component, but I can't get any props from connect() or even from the function definition inside the component. I have tried to defined ...
0
votes
1answer
35 views

Dispatching action calls incorrect reducer

Summary In order to learn Redux, I am incorporating some state, actions, reducers, and trying to see how they are used in React Components. I have set up a test object... const initialState = { ...
1
vote
1answer
11 views

Expo SDK32 undefined is not an object (evaluating '_expo2.default.KeepAwake')

I upgraded expo for my React Native App from SDK25 to SDK32 directly following the steps explained on the Expo Documentation. When i try to run the app into the Expo client, i get the following error ...
-1
votes
0answers
16 views

Uncaught (in promise) TypeError: Cannot read property 'getState' of undefined

I'm getting this error getstate undefined.Can someone please help? const antType= Boolean(req) ? getAntType(req.cookies) : reduxStore.getState().abcDetails.antType; let abcId = null; if(req){ ...
0
votes
1answer
19 views

React Rendering twice in Private Routes

When I run console.log in my render component, it appear twice in the chrome dev inspector. This only happen in the private routes. I have tried messing around the Router in Switch, but nothing doesn'...
0
votes
1answer
20 views

React Event Handling: Marking as Favorite item on Instant in

So in my recipe App, users are able to mark or unmark recipes as their favorite. The only thing I can't wrap my head around is How to make it instant. my current code supports makes a post call to ...
-1
votes
0answers
19 views

Live Updates: Streaming the data to AgGrid from Redux Store without using the function 'updateRowData'

Getting stream of array of records. Based on the Flag in the each record, the record should be added/updated/removed from React-AgGrid. Is there a way without using AgGrid function 'updateRowData' to ...
0
votes
0answers
22 views

My react native app logouts on every refresh in feathersjs

I am using react native with feathersjs and having issue of being logout after every refresh on app after some changes. const client = feathers(); options = { header: 'Authorization', // the ...
0
votes
0answers
32 views

How to fix “TypeError: Cannot call a class as a function” on React component with connect

Hy all, I have one component (Home.jsx) that render a page, and it handle language translation with a package called withLocalized (react-localize-redux). Now what i want to do is to separate the ...
0
votes
1answer
25 views

redux logger not logging to console

There are no actions logged in the console. Any ideas? store: import thunk from "redux-thunk"; import logger from "redux-logger"; import rootReducer from "../reducers"; const initialState = { ...
0
votes
0answers
18 views

Sync view component with DOM and Redux state

I would like to know how can I sync the view with my redux state please. Currently I have this component : ... handleChange(e) { console.log(e); this.props.updateMessageOnBlock(this.props....
0
votes
2answers
79 views

Why isn't my component re-rendering or my mapstatetoprops not working?

I have a simple React Native app with Redux. When I try to connect my application state to my redux state, it is working. But when I map my redux state to the props, it is not working. My redux-dev-...
0
votes
0answers
34 views

Is it okay to pass a HOC via React context?

I have a task to create a new React component in an existing project. The project is composed from several sub-projects. Two of them are: WebApp: contains the most of application logic, Redux store, ...
0
votes
0answers
19 views

Duplicate tasks are being displayed even though only one document is being added to firebase

I'm using react-redux-firebase to create a task manager. When a task is created, a user fills out a form and this data is used to add a document to my todo collection in firebase. So we have a ...
0
votes
1answer
28 views

Toggle button is in off state though the value of it is true

I have a switch in one of the many tabs such as Help, About etc. as shown below: As you can see, the value of it is set programmatically based on a state variable in componentDidMount(). But the ...
0
votes
0answers
27 views

React not updating state on reused component?

I'm updating a project from a MERN stack course I completed earlier. It has a 'Like' and 'Dislike' button, which update in MongoDB, and then the updated number of likes gets rendered to the screen. ...
0
votes
1answer
14 views

React: I have a try/catch block in a service that I'm trying to add an Axios call to but I'm not sure where to put it

I have a try/catch block inside a React service that I now need to add the actual Axios call and make a GET request to an external API in order to get live data back and then set that data response to ...
0
votes
0answers
31 views

How to return HTML response from action to component

I have a GET url which returns HTML data as its response. I am able to see the html response in networks tab in chrome but the same is not returned to my component. Adding code snippet for my ...
0
votes
1answer
37 views

Adding Object to nested array in react-redux

I found lot's of solutions online, but I've done my best for a week and found no way to solve it. I believe the fault to be the reducer ADD_GOAL, that is why i left it empty. Thanks alot! :) I want ...
0
votes
0answers
20 views

Fetching Firebase Realtime Database of array

I want to fetch multiple specified Childs. Is it possible to do so in one fetch? I have tried to do this with orderByChild and equalTo My Data Structure: "lections" : [ { "id" : 1, "title" ...
0
votes
1answer
26 views

one Collapsible should open at one time

// Here in my code there are three Collapsibles, after clicking one it will expand, but to close it again i have to click on that particular text. I would like to make a change: if any of the three ...
0
votes
1answer
167 views
+50

Usage of React Redux in Modal

I am learning Redux in React. I am using Redux in React for Modal development. My code is like below render() { return ( <Modal id="addressModal" open={this.props.controlModal} onClose={...
0
votes
0answers
13 views

Why is redux-api-middleware not storing response in State?

I set up redux-api-middleware in this project I'm working on. Everything seems to be working and I don't get any errors, but my payload isn't being stored in state. Am I missing something here? I'm ...
0
votes
1answer
25 views

React Redux createStore Config

I am developing my project using React and Redux. I am getting below error when I run my project after few days later. Could anyone say why I am getting below error.
0
votes
0answers
16 views

How to test a target component when it refers to other components' state when it renders

I am writing jest tests. The tested Dashboard component's render shows below, in Dashboard.jsx render(){ const {appState,dashboardState,shopFiltersState,shopSortersState}=store.getState(); ...
0
votes
1answer
33 views

Could not find “store” in the context of "Connect

I have an app that imports js-common library created by me. This library exports several components. When I try to import one of them in my app I get: "Could not find "store" in the context of "...
0
votes
2answers
52 views

React, Redux - pass function from component A to other components

import React from "react"; import OtherComponent from "./OtherComponent"; class Main extends React.Component { constructor(props) { super(props); this.runMyFunction = this.runMyFunction....

http://mssss.yulina-kosm.ru