Questions tagged [redux-offline]

28 questions
4
votes
1 answer

Redux state is missing "offline" part from redux offline

I'm using Redux Offline in my Angular project, and now I want to enable cancelling an item in the outbox while in offline mode. Basically, I just want to filter on the outbox array to remove items I want to cancel/modify. My problem is it is missing…
MartinJH
  • 2,590
  • 5
  • 36
  • 49
3
votes
2 answers

Offline first React Native Expo app with background sync

I am looking at building an offline first React Native Expo app that automatically pushes data to an API when the device gets a connection. However I am struggling to see how if this is possible within Expo and need some guidance. The app will need…
Stephen Kempin
  • 113
  • 2
  • 16
3
votes
0 answers

NetInfo from @redux-offline/redux-offline Invariant Violation error in react-native

After successful build I try to run react native application on the IOS simulator but I've got an error: Invariant Violation: NetInfo has been removed from React Native. It can now be installed and imported from '@react-native-community/netinfo'…
3
votes
0 answers

API call handling in offline mode (React Native)

Is there a way to handle an API call which was sent while being online but all of a sudden after that call is made you lost network and got in offline mode meaning that the request has been sent to the server but you won't be able to see the…
usafder
  • 791
  • 5
  • 17
3
votes
1 answer

Purge or call action to reset states?

My application is using the redux-offline package which has the ability to persist store. I came across this concept purge which seems to reset states upon loading app. My apps have a sign out function in which it makes sense to clean the…
Isaac
  • 12,042
  • 16
  • 52
  • 116
2
votes
0 answers

Redux offline createOffline vs Offline API?

What is the difference between createOffline and offline api? The redux offline home page shows an example using offline https://github.com/redux-offline/redux-offline In the docs there are examples to…
dnndeveloper
  • 1,631
  • 2
  • 19
  • 36
2
votes
2 answers

How to delay rendering correctly

//offline.js import { offline } from '@redux-offline/redux-offline'; import offlineConfig from '@redux-offline/redux-offline/lib/defaults'; const config = params => ({ ...offlineConfig, persistCallback: params.persistCallback }); export…
Isaac
  • 12,042
  • 16
  • 52
  • 116
1
vote
0 answers

Dispatch redux toolkit async thunk by name/type

need your help here. I'm trying to use redux-toolkit with redux-offline. My issue is that I need to find a solution to call asyncthunk from redux-offline's "effect". Ideally it should be : dispatch({ type: 'someOfflineAction', meta: { offline:…
holyris
  • 171
  • 11
1
vote
0 answers

Encrypt the data before store in local storage in Redux offline npm package

In my react application I'm using Redux Offline for offline features for persist the application data when offline. This package store data in browser local storage. I need to encrypt the data when storing to local storage. I got to know…
Rayan
  • 181
  • 1
  • 1
  • 4
1
vote
0 answers

How can I add a specific timeout for one specific redux-offline request?

I would like to add a timeout value for one specific request using redux-offline. I want to achieve that it fires a timeout after x seconds (also while being offline) and therefor the discard function is being called with http error 408. Is this…
Dan T
  • 21
  • 2
1
vote
1 answer

how to configure the effect reconciler to pass errors to rollback with redux-offline?

Problem I have just recently found out about this library and was implementing it for a react native app, but can't get my head around how the effect reconciler passes the errors to rollback. I am firing the below action, and whether the response is…
amo
  • 147
  • 1
  • 3
  • 13
1
vote
1 answer

Redux Offline debounce server requests

I'm trying to work out the best way to get Redux Offline to debounce server requests. Currently when the server is busy, it saves them up in a queue and sends all of them. I'd like it just to save the last one but use the same Save action to update…
beek
  • 3,522
  • 8
  • 33
  • 86
1
vote
0 answers

Application fails to load on first run. (Cannot convert undefined or null to object)

Everything was working fine before I added redux-offline in my store. export const store = createStore( persistedReducer, composeWithDevTools(middleware, offline(offlineConfig)) ); This is an error when I load the application for the first…
prabin badyakar
  • 1,636
  • 2
  • 16
  • 24
1
vote
1 answer

React native Redux offline API Response

In the redux-offline How to view my API response in the reducer. below my code i log my action in the reducer in the i can see my request data. In that reducer how to log my response data .thanks in advance My code is here action.js export…
SATHEESH P
  • 389
  • 1
  • 3
  • 21
1
vote
1 answer

redux-offline ignore middlewares when executing commit or rollback actions

As shown at https://github.com/redux-offline/redux-offline/pull/178#issuecomment-408795302, we are trying to use with redux-offline a middleware that can dispatch new actions after their counter-parts commit or rollback are executed. Point is that…
Piranna
  • 1,697
  • 1
  • 14
  • 16
1
2