Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Regarding offline state #179

Open
dkaushik95 opened this issue Aug 20, 2018 · 1 comment
Open

Question: Regarding offline state #179

dkaushik95 opened this issue Aug 20, 2018 · 1 comment

Comments

@dkaushik95
Copy link

Is there any way to stop the fetching process in oboe when the internet is not available? I am using react native and when my internet goes off, I am stuck in a loading state forever.

@dkaushik95
Copy link
Author

Here is a sample code

loading = true
error = false
oboe(url)
.node('!.*', data => {
  insertData(data)
})
.start(status => {
  loading = false
})
.done( res => {
 loading = false
})
.fail(error => {
 loading = false
 error = true
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant