Questions tagged [react-redux]

Official React bindings for Redux

0
votes
2answers
16 views

React/Redux export default connect() doesn't seem to be connected to Provider

I'm learning MERN Stack via a youtube playlist https://www.youtube.com/watch?v=TO6akRGXhx8. I'm stuck when i reached the 28:04 where he forgot to connect his component with 'react-redux'. I followed ...
0
votes
0answers
26 views

where to access redux store from parent component

I have a dashboard component that is displaying a table component. On the dashboard component, I am loading the redux store with an account information through an async await call in ...
0
votes
0answers
5 views

Redux Persist: Side effect right before rehydration

I need to run some code using data stored in LocalStorage before the app is ready for the user. I there a way to do this without intercepting persist/REHYDRATE action? It's just weird to run some ...
0
votes
4answers
39 views

How can I pass HTML as props in ReactJS

I have an HTML tag value in my state variable as this.state = { value: '<p>This is a paragraph</p>' } I want to display this HTML content in my child component. I'm trying to do as ...
0
votes
1answer
33 views

Closure value changes without being reset

NOTE THAT THIS IS SOLVED I don't expect someone to solve the problem because there is lots of code missing but maybe I'm missing something here. I'm creating a closure in mergeProps to be used as a ...
1
vote
1answer
19 views

Issues with React Native Navigation

I just faced an issue with react native navigation with 502 Bad Gateway . Have a look at issue for below screenshot . Please help us if any idea on this . Issue Screenshot : https://i.stack.imgur.com/...
1
vote
0answers
32 views

TypeError: Object(…) is not a function (REDUX - FIREBASE)

I am attempting to peform Auth with Firebase and Redux. When I try to Login I am getting an error: " Uncaught TypeError: Object(...) is not a function" Here is my 'Login' Component: import React, { ...
-1
votes
1answer
15 views

Forgot Password page using redux in react native [on hold]

I am completely new to react native and redux, is there any useful resource for me to go through and build a forgot password form for my project using react native and redux? Providing examples here ...
0
votes
1answer
9 views

Cannot reach react application via dns hosted on ec2

I just want to see my development working on an EC2, showing to some friends, and think in deploying it after all of the work is done, but react doesn't cooperate. :/ I did everything I always do. ...
0
votes
1answer
14 views

make yield.put happen one after the other in redux-saga

I have the yield.put to happen one after the other as async behaviour is no good for me for this implementation. generator function export function * createUser (action) { try { axios.defaults....
0
votes
0answers
8 views

Springboot -react app Cross origin requests issue [duplicate]

I created a simple rest service using Springboot. It tested using a Postman and it’s working fine. Then I tried to use a basic react-redux app to call the same ( in chrome browser) but I am getting ...
0
votes
0answers
23 views

how to redirect after authentication using oidc client in react app

I am trying to do authentication using identity server 4 for my react app.i followed this documentation.I am using implicit flow of identity server so onload application it will go to login page of ...
1
vote
1answer
43 views

can't update the state in react native?

I have some issue with State can't set, when I press the button the state is set "loading: true" but when I have some error with Auth I need to set state "loading: false" as I write in the cases, to ...
0
votes
0answers
8 views

React + Rails with Redux Persist Gate

I am new to everything as specially to react_on_rails and I am trying to figure out how to use redux-persist with my project so that when I changing the page, I am not losing any redux store. I have ...
0
votes
1answer
27 views

Multiple async dispatches on page load gives error?

In my homepage, I've got several widgets that need to return data from async operations. In each component, I am dispatching the action as such: componentDidMount() { this.props.dispatch(...
0
votes
0answers
25 views

Unable to assign data to the state after fetching the data from post?

I am trying to assign the action.payload to the state logged user but when i console log print the loggeduser it returns undefined This is the action.payload data: {id: 1, firstname: "Leanne", ...
1
vote
1answer
35 views

Issues with asynchronous nature of redux in React?

I'm pulling data into one of my parent components and then using various filter statements which are based on user choices from select boxes. I'm then calling an action which simply stores that ...
1
vote
1answer
17 views

React Native Maps ref issue

I have a react-native-maps MapView which is utilized in a fitToCoordinates function. The function zooms the map to fit a start point (current user location) and an end point. Below is the MapView ...
2
votes
3answers
31 views

How to add object at array index in reducer

I have store with arrays (store.calendar[0].todos[{title: title, etc...}]) 0: {todos: Array(0)} 1: {todos: Array(0)} 2: {todos: Array(0)} 3: {todos: Array(0)} 4: {todos: Array(...
0
votes
1answer
17 views

Why is my React view not updating when the redux store changes?

I'm new to React and Redux. I've been trying to create a counter to learn how to work with Redux, but I cannot get the view to update, or mapStateToProps to be called. I've gone over the Redux ...
1
vote
0answers
12 views

Should Redux Devtools Extension be installed as a dev dependancy when using composeWithDevTools()?

I decided to add the RNDebugger and Redux Devtools Extension packages to my app for help debugging and for later testing with redux persist (which I haven't implemented yet). Thus, I am now using the ...
0
votes
0answers
26 views

How can I render a specific content according to the click button with React?

I am developing a code editor online and I need to change the code inside of editor according to the click a button/file name. I have: src/components: Header.js SessionHeader.js // session is the ...
1
vote
1answer
23 views

Authorization component URIs react and redux based on route change

I m beginner with react-redux and I want to implement authorization. Here is my container named RestrictedRoute that checks if targetted URI is allowed to the user or not. Now the issue is that ...
3
votes
1answer
31 views

Populating initialState in reducer through localStorage

I have a react/redux app where I need to populate a prop from state initially with localStorage. I was thinking of doing it with something like this const initialState = (() => { let username = ...
0
votes
1answer
43 views

ShallowWrapper::setState() can only be called on class components

this test was passing before i using withSnackbar. but now it fails and i really don't know how to fix that. So any help will be appreciated. Thanks. Here is my export in the component: export ...
0
votes
0answers
11 views

After successful deployment of MERN app to heroku, running app returning a white page. But it gives the desired result to chrome

Heroku app returning white page in other than chrome browser. Also returns white page in incognito mode. I am using MongoDB(mLab) Express, React-Redux, NodeJs. App link: https://fierce-sierra-79251....
1
vote
0answers
38 views

ReferenceError: ReferenceError: Can't find variable: dispatch

I'm trying to use redux with react-native. I have created a fetch post data example app , then I just wanted to use with mapDispatchToProps method. I read the documentation and look at some tutorial, ...
0
votes
1answer
8 views

Nav.Link trigger Router

simple example of how to use react-router Know with react-bootstrap Nav.Link using bootstrap Navbar (Color schemes) made the changes below for the simple example but the Route doesn't work anymore. ...
0
votes
0answers
11 views

How to get access to PouchDB db object in reducer.js file?

I am following react redux tutorials and the react-boilerplate application template. This template separates reducers into a reducer.js file. The configureStore.js file was edited to include the ...
0
votes
0answers
17 views

Why can't I persist user sessions in a React SPA using redux-oidc?

Apologies in advance for this lengthy post. I've tried to be as clear as possible because it's possible my understanding of certain concepts is flawed. As part of my journey into the world of ...
0
votes
2answers
20 views

Does not take me to the component (react-router, link)

I have a problem with react-router. My application displays the list of recipes. In the formulator, you enter your preferences (diet, calories, allergy), the next information is sent to the api, ...
0
votes
0answers
9 views

Creating React middleware that listens for errors on all actions

I am writing my first custom middleware and slightly clueless to what is going on. My objective is to check if any action receives a network error, if so console.log it. import { Middleware, ...
1
vote
0answers
12 views

How to edit persistent store from react-persist during runtime

We are using react-persist and we have created a persistent redux-store during initialization. We'd like to toggle the persistence state of a reducer through persistConfig after initialization (or ...
0
votes
0answers
14 views

Redux - Making call to action from a method [duplicate]

I am working on a react application. From my component I am able to make a call to actions which in turn is able to update store. Complete flow is working. My component is referring to another file ...
0
votes
0answers
29 views

React redux dispatch issue

I'm trying to dispatch a function from a component which has route 'localhost:8080/location/:id' but it seems to give an error, the same dispatch function is working in other component which doesn't ...
1
vote
0answers
34 views

Handling deeply nested data in React components

I'm facing a dilemma in my components where the data I am trying to access doesn't "exist" yet. For example, when I log my redux actions I get the following: The first image is what my data looks ...
0
votes
1answer
13 views

Selector for React-Redux

To use selector, I tried to follow this URL reference: https://blog.isquaredsoftware.com/2017/12/idiomatic-redux-using-reselect-selectors/ One of the example is : const selectSomeData = state =&...
1
vote
1answer
34 views

Dynamically change header title in react native navigation

For a school assignment we're creating an app in react native with react navigation and redux. Because all of us are new to react we have an issue we are unable to resolve. We want to change the ...
0
votes
1answer
17 views

React On Rails and Redux losing Persist Store after changing the page

I am trying to build a simple application with Ruby on Rails and React. I am using a gem react_on_rails. In addition, I am trying to use Redux to communicate between different components when I need. ...
1
vote
1answer
33 views

Set state of react component by using redux store

How I can assign some values of redux store to my component local state? I should use redux actions to get data from API in my componentDidMount() method. Am I right? after getting data by redux I ...
0
votes
1answer
45 views

Redux: Several dispatches vs just one on single page?

My question is more of an architecture question. In my project, once a user signs in they are taken to a home page that has several "widgets". Each widget requires an API call of some sort. Five of ...
1
vote
0answers
28 views

How to unit test reduxsauce?

I am using reduxsauce library for redux store, and I want to unit test a single redux store in it. The redux file: import { createReducer, createActions } from 'reduxsauce' import Immutable from '...
0
votes
0answers
34 views

React mouse events: onClick doesn't fire after drag and drop

I have a react application for drag and drop feature. Before dragging when I click the <img> the onClick fires and the onClick function definition works. After that I dragged the image and ...
0
votes
1answer
20 views

How to fix nativebase toast error undefined is not an object (evaluating 'this.toastInstance._root')

I am using nativebase ("native-base": "^2.12.1") at react-native project. I gonna use show toast on the method in react component class assignTicket(id) { return Toast.show({ text: "Wrong ...
4
votes
4answers
62 views

React - Login Variables cached in the browser

I'm quite new to React and trying to learn it but have a strong background in backends (java/nodejs/php/...) So first I wanted to create a login portal, basically 3 pages: - The homepage which ...
0
votes
2answers
51 views

Dispatch is not a function react

I'm working on an application using react and redux. I use api. application flow: fill the form, click the send button, send data from the form to the api, go to the recipes page The first ...
0
votes
2answers
50 views

React Redux not getting state in mapStateToProps

I am trying to make user login in my application through react redux but it gives error as TypeError: TypeError: undefined is not an object (evaluating 'state.user_name') app.js import React ...
4
votes
0answers
54 views

In Custom App with embedded Admin, adminSaga doesn't work

I am trying to embed React Admin (RA) into an existing React-Redux application and following the documentation here: https://marmelab.com/react-admin/CustomApp.html While I have managed to ...
0
votes
1answer
17 views

Navigate to athor page from dispatch in react redux

I want to navigate to profile page after logging in successfully with react redux but it is giving error as: [Unhandled promise rejection: TypeError: undefined is not an object (evaluating '...
0
votes
0answers
22 views

How to get all Java file in react native?

Is it possible to get Java file from react-native projects . By default there are 2 java activities (MainActivity and MainApplication Activity) that we can get from android folder. But suppose I have ...

http://mssss.yulina-kosm.ru