Giter Club home page Giter Club logo

bootcamp-app-3's Introduction

App.js

We have a constant of shoes having objects which are shoes.

{Object.entries(shoes).map(([slug, {name, img}])=>
  • )}

    1)We are converting each fo these shoes(objects) into entries.

    2).map gives us an array so that we can map over each of the entries. In this array we have two elements i). is the key(like "air-jordan-3-valor-blue)we are calling it slug in array or whatever you like. ii). Second is the value of each entries(name and img), we are destructuring it thats why placed in crly brackets.

    1. => after arrow we define what we want to render. In this case we are returning li that has a key of slug and h2 which contains name of the shoe/entry and img tag having src of img

    We have defined all of this code in LaunchIndex component which is a children of Launch component but when we see DOM we are not getting the result. With nested Routes you need to tell the Parent Route to render the matching children it encounters, this is done using the

    First we created the child component by the name of LaunchIndex which returned list of shoes. When we click on it nothing happened. We want to see the details of the shoes fo we created another Route by the name LaunchShoe with the path of ":slug" is the placeholder. We enclosed

  • in tag which link to slug (lauch/$slug) slug is the name of the shoe

  • bootcamp-app-3's People

    Contributors

    shoaibtahir97 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.