All Questions
1,083 questions
3
votes
1
answer
65
views
Persist Store with Redux in React Native
I'm having a problem getting Redux-Persist to work and hoping to get some pointers if I've done something wrong.
Here is my Store.js
import { configureStore, getDefaultMiddleware } from "@reduxjs/...
1
vote
1
answer
694
views
Error: could not find react-redux context value; please ensure the component is wrapped in a <Provider> in React native Expo App
I am getting this error while trying to run my React-Native app. I am trying to make a React-Native app which will have a BottomNavBar and drawer navigation. I am using Redux-Toolkit for state ...
1
vote
1
answer
50
views
React-Redux could not find Redux context value when using useSelector
I created a store and authreducer and every thing works as expected
but when I add the useSelector in app.js I get this error:
ERROR Error: could not find react-redux context value; please ensure
...
0
votes
1
answer
279
views
Pusher channel in React Native + Redux does not use updated state
I'm using pusher-websocket-react-native to create a real-time chat for a mobile application on Expo.
I noticed that whenever I subscribe to a presence channel, it maintains its own state which means ...
0
votes
0
answers
348
views
"TypeError: _reactTestRenderer.default.act is not a function" despite same React and react-test-renderer version
I'm very new to React and am trying to integrate a unit test framework into an existing React-redux application. I've got the following test to test a 'Cancel' button:
import React from 'react';
...
2
votes
2
answers
143
views
Configure a simple JavaScript file based on a value in the Redux store
so, I developed an application with RN and Redux, I have a colors.js file like that
const Colors = {
mainColorDark: '#E34b3d',
mainColor: '#e3596d',
mainColorLight: '#F0965C',
}
export ...
0
votes
0
answers
118
views
React Native legacy_createStore undefined is not a function
store.js :
export default {
nameList: [],
}
reducers.js :
export default function (state, action) {
switch (action.type) {
case "ADD_LIST":
const ...
1
vote
2
answers
33
views
I can't recover firebase error in redux toolkit
I created my store with Redux-Toolkit and my slice. Now I want to retrieve the data using firebase. I created an async thunk using createAsyncThunk. I want to register a user using email and password. ...
0
votes
0
answers
274
views
RTK query - Query lazyload and cache data append problem
I'm facing problem while trying to append a cached data with a new data in rtk query. The api is paginated and I want to append the data with the previous data.
If I hardcode the query
loadPosts: ...
0
votes
2
answers
521
views
React component is continuously re-rendering
I'm trying to display a Google char, a table, and some widgets in a react component. I'm using React and redux to store the state of the entire app. Here I have the component:
import { useEffect, ...
0
votes
1
answer
108
views
React Native component with Redux is re-rendering on every addition of new record to the Redux store
I have a React Native component that uses Redux to manage the state. The component has a useSelector hook that selects records from the Redux store. Every time a new record is added to the store, the ...
0
votes
0
answers
186
views
TypeError: Cannot read properties of undefined reading 'getsState' issue while setting up redux for application
I have a redux application that I am currently setting up and I am getting the following error that I am not sure about. I am trying to fix it so I can start developing the application.
Provider.js:20 ...
1
vote
1
answer
392
views
Invariant failed: A state mutation was detected between dispatches, in the path
In my app I am calling logout api(post) and AsyncStorage.clear(); then my login screen come but some how unable to store state.
this waring in device
I am also unable to click on login screen button ...
1
vote
0
answers
47
views
I want to use user.posts, property I defined in redux/reducers/user.js, but I keep getting errors
I am trying to make an instagram feed that shows up the posts from people whom I follow. However, my screen doesn't show any post even though the person whom I follow have total five posts. Following ...
0
votes
1
answer
42
views
what is the best way to change BaseUrl in constants component depending on Login condition in React Native?
I have a login screen in react native project. It only accepts phone numbers of US or Indian country code only. Right now I am dispatching the information to redux from login screen like below:
Login....