All Questions
Tagged with react-native redux
3,522
questions
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 (...
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 ...
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 ...
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 ...
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({
...
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.
...
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 ...
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 ...
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 ...
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 ...
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, ...
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 ...
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 ...
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 ...
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 ...