Skip to content

Instantly share code, notes, and snippets.

@Muneefm
Created September 29, 2018 04:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Muneefm/373d934df776320b6d1a170d135d05b9 to your computer and use it in GitHub Desktop.
Save Muneefm/373d934df776320b6d1a170d135d05b9 to your computer and use it in GitHub Desktop.
for medium
requestData = ()=> {
const url = this.URL+'Muneefm/demo_data/master/movie.json?rand='+(1 + Math.random() * (99999 - 1));
console.log(url)
fetch(url).then((response) => response.json()).then((jsonResponse) => {
this.setState({
title: jsonResponse.original_title,
imagePath: jsonResponse.poster_path,
isLoadingComplete: true
})
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment