Giter Site home page Giter Site logo

react-image-fetcher---working-with-apis-react-react-authentication-creating-a---x7epzcw6z3fw's Introduction

React photo fetcher.

The API https://jsonplaceholder.typicode.com/photos/${id} where id is number between 1-5000, returns an object of this structure {
 albumId: 1,
 id: 5,
 title: "natus nisi omnis corporis facere molestiae rerum in",
 url: "https://via.placeholder.com/600/f66b97",
 thumbnailUrl: "https://via.placeholder.com/150/f66b97"
}

On initial load of application, only an input box which takes only numbers is visible. When someone enters a number, it makes a GET request to the above mentioned api with that number. While request is resolving, it shows the Loader component which is predefined.

After data has been fetched, display the PhotoFrame component. The PhotoFrame component takes 2 props, url and title. The component returns a div with class="photoframe", inside that using display an img with using url prop as src. Also display the title inside div with class="caption".

This repeats further whenever someone changes the number in input.

react-image-fetcher---working-with-apis-react-react-authentication-creating-a---x7epzcw6z3fw's People

Contributors

shreyhere avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.