Questions tagged [react-redux]

The react-redux package provides the official React bindings for Redux: the `useSelector` and `useDispatch` hooks and the `connect` higher-order component. Use this tag for questions about accessing and updating Redux state in React components.

React Redux is a library that contains React bindings for Redux. Redux defines itself as a predictable state container for JavaScript apps. Redux works especially well with React.


Resources


Related tags

Redux enhancers:

Alternatives to Redux:

23349 questions
4
votes
2 answers

Why React Redux context.store is undefined in child component?

I am trying to access store from child components, but its always undefined, and due to this I have to pass the properties to child component. This is the main app starting point: ReactDOM.render(
Piccaza De
  • 459
  • 5
  • 15
4
votes
1 answer

React Router not functional when deployed in a sub-directory On Apache

I'm having quite an issue deploying my react app to a sub-directory on appache. I am using create-react-app and React router v4. When i visit the Url www.example.com/myApp. the html i am rendering as my homepage gets rendered properly. But if i try…
4
votes
2 answers

Unsubscribe from timer in rxjs

Hi I have a timer running which is like it should show a component for 30sec after every 10 seconds. My code is like this` import { timer } from "rxjs"; componentWillReceiveProps(nextProps, nextState) { console.log("RECEIVED PROPS"); if…
suja
  • 1,198
  • 2
  • 12
  • 32
4
votes
1 answer

How can I develop a plugin for Kibana?

I am really a beginner in ELK stack. I want to learn a plugin building for Kibana. I see their documentation for plugin building (https://www.elastic.co/guide/en/kibana/current/development-plugin-resources.html) But the thing is, it's not enough for…
4
votes
1 answer

React Redux - is it ok to throw every state into connecting my components?

As stated in the question, say, I have a store with multiple reducers (>10 Redux states). Typically in a component, whenever we want to access a particular state from the store, we would do something like: //only 3 needed states const…
NewbieCoder
  • 676
  • 1
  • 9
  • 32
4
votes
2 answers

Where to store user information in redux store or in local storage?

I'm wandering how to store user information after login? Is it a good idea to store all the information in local storage or in redux store? After successful login API return me a large object with user role and permission along with some other…
Tech Aimley
  • 67
  • 2
  • 7
4
votes
1 answer

Redux saga event channel is terminated after another saga is executed

I am using saga eventChannel to listen to events that are being triggered(maybe WebSocket in the actual app), and then I am updating my Redux Store. In component, I am calling an API action. Then an interval(polling), which is being handled by a…
sahil solanki
  • 507
  • 6
  • 20
4
votes
4 answers

Where is a good to call actions for fail and success in react-redux

I have a question about redux. Now, I'm building my mobile app following redux advanced tutorial. The tutorial says that you have to create 3 actions each 1 function so I have created 3 actions for sign-in function like…
Satoru Kikuchi
  • 1,069
  • 2
  • 21
  • 33
4
votes
1 answer

How to I pass props in AppRegistry registerComponent react native

thanks in advance How do I pass props from my index js using AppRegistry AppRegistry.registerComponent(appName, () => App); I also need to pass props too AppSide, prop which is from the index. And my App looks like this export default () => ( …
Ankit Jayaprakash
  • 1,040
  • 3
  • 15
  • 31
4
votes
1 answer

Redux Store does not update state with created data on firebase real-time database

I have setup my firebase functions and it works perfectly. The data flow for my app goes thus: User fills a form and submits {works} The data is sent to the real-time database {works} The data is then passed back to the redux store by listening to…
Edward Bella
  • 127
  • 10
4
votes
2 answers

How to use react hook useEffect only once in my case?

I think my question for a while seems to be a duplicate but i guess it is not, i have checked many questions that have same title but with different case The problem is that i was forced to use react hook twice in my code and i even think to make…
Saher Elgendy
  • 1,519
  • 4
  • 16
  • 27
4
votes
4 answers

ReactJs - Initialize Redux Store from URL query parameters

I'm extremely new to ReactJs and Redux. I am able to set up a simple app with multiple React components dispatching actions to the Redux store on button clicks, dropdown selections, etc. But one thing I can't seem to figure out is, how would you…
Clark
  • 137
  • 1
  • 2
  • 6
4
votes
2 answers

React.js - Redux Hooks Invalid Hook Call

I'm trying to use useDispatch inside my component's render function. import { useDispatch } from 'react-redux'; I have a input that tries to useDispatch on onChange onChange={() => useDispatch()(update("test"))} When onChange is fired, I get this…
Hobey823
  • 276
  • 4
  • 13
4
votes
1 answer

React: How to display error on incorrect user login

I am a beginner in React and was implementing a function where on a button click in the render method, I go to a function foo. In that function, I am sending the username and password to a server. If the username and password are correct, it…
xyz6675
  • 355
  • 2
  • 6
  • 17
4
votes
1 answer

What is the difference between export HTTPS=true and set HTTPS=true (react)?

package.json "scripts": { "start": "export HTTPS=true&&PORT=3000 react-scripts start" vs "start": "set HTTPS=true&&PORT=3000 react-scripts start" }
1 2 3
99
100