All Questions

Tagged with
Filter by
Sorted by
Tagged with
209votes
4answers
314kviews

Axios get in url works but with second parameter as object it doesn't

I'm trying to send GET request as second parameter but it doesn't work while it does as url. This works, $_GET['naam'] returns test: export function saveScore(naam, score) { return function (...
user avatar
  • 5,790
177votes
6answers
178kviews

How do I add an element to array in reducer of React native redux?

How do I add elements in my array arr[] of redux state in reducer? I am doing this- import {ADD_ITEM} from '../Actions/UserActions' const initialUserState = { arr:[] } export default function ...
user avatar
  • 2,365
86votes
4answers
55kviews

Passing props to react-redux container component

I have a react-redux container component that is created within a React Native Navigator component. I want to be able to pass the navigator as a prop to this container component so that after a button ...
user avatar
  • 5,994
84votes
4answers
87kviews

Subscribe to single property change in store in Redux

In Redux I can easily subscribe to store changes with store.subscribe(() => my handler goes here) But what if my store is full of different objects and in a particular place in my app I want to ...
user avatar
70votes
5answers
39kviews

Nested redux reducers

Is it possible to combine reducers that are nested with the following structure: import 'user' from ... import 'organisation' from ... import 'auth' from ... // ... export default combineReducers({ ...
user avatar
59votes
4answers
37kviews

How to use Redux to refresh JWT token?

Our React Native Redux app uses JWT tokens for authentication. There are many actions that require such tokens and a lot of them are dispatched simultaneously e.g. when app loads. E.g. ...
user avatar
  • 2,702
54votes
6answers
58kviews

Wipe AsyncStorage in react native

I notice that I am wasting a certain amount of time debugging redux actions that I am persisting to AsyncStorage in react-native thanks to redux-persist. Sometimes I'd just like to wipe AsyncStorage ...
user avatar
  • 5,847
52votes
5answers
89kviews

useDispatch() Error: Could not find react-redux context value; please ensure the component is wrapped in a <Provider>

I am trygin to use React-Redux library and I am getting the error on the title. I wrapped my components with Provider but I still get the error, only if I implement the useDispatch() hook. The app ...
user avatar
  • 853
47votes
3answers
60kviews

Could not find "store" in either the context or props of "Connect(App)"

I'm having problems with misconfigured Redux after merging contents of multiple files into one to serve as config for Redux. How to resolve store, while keeping this in one file? Unhandled JS ...
user avatar
  • 7,246
38votes
2answers
64kviews

React-redux component does not rerender on store state change

I'm stating to learn react and redux today, yet I cannot figure out how to force component to rerender after state change. Here is my code: const store = createStore(loginReducer); export function ...
user avatar
  • 8,577
37votes
4answers
18kviews

React Redux: Should reducers contain any logic

I have a cart reducer function with add, update and delete cases. I also have a product array within the redux store. When there are two items added to the product array, instead of having two items, ...
user avatar
  • 1,673
30votes
2answers
22kviews

How do you mix componentDidMount() with react-redux connect()?

This seems like a simple use case but I can't figure it out. I want to display a list of items retrieved from a request to a remote API over HTTP. I would like the screen to show blank initially while ...
user avatar
  • 2,181
30votes
4answers
17kviews

Proper way to navigate with React Native, Redux, and Navigator

I have a React Native app using the Redux framework and I'm using the Navigator component to handle navigation. I've had a little bit of trouble getting the navigation working and I'm not able to find ...
user avatar
29votes
1answer
7kviews

Using Realm in React Native app with Redux

I am about to undertake the development of a React Native app and am thoroughly convinced of the benefits of managing the app's state using Redux, however I'd like to make the app's data available ...
user avatar
  • 1,790
28votes
1answer
11kviews

Relay vs Redux vs Apollo with GraphQL and React-Native [closed]

I have to start a new (web + native) project (mid-size app) from scratch. Due to the plethora of JS frameworks and implementation out there especially in the last couple of years, I have been having a ...
user avatar
  • 2,505

15 30 50 per page
1
2 3 4 5
235