Skip to content

Instantly share code, notes, and snippets.

@tonyvu2014
Created June 10, 2018 08:10
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
axios
axios.post(FEED_URL,
{
terms: terms,
limit: LIMIT
},
{ timeout: TIMEOUT }
)
.then(res => {
this.showFeeds(res)
console.log('FeedsScreen - loading feeds is done')
})
.catch(err => {
axios.post(FEED_URL,
{
terms: terms,
limit: LIMIT
},
{ timeout: TIMEOUT }
)
.then(res => {
this.showFeeds(res)
console.log('FeedsScreen - loading feeds is done')
}).catch(err => {
console.log(err)
this.setState({ isLoading:false, hasError: true })
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment