Giter VIP home page Giter VIP logo

react-hooks-props-basics-lab's Introduction

Props Basics Lab

Learning Goals

  • Practice writing dynamic components
  • Practice jumping into existing code and making the necessary changes

Introduction

Previously, we had been importing some data directly into each component that needed it using import. When we're working with React, it's we'll often access data by passing it down as a prop rather than importing it. This will be particularly true once we start working with data from external sources, such as APIs.

In this lab, you'll write React components and render them dynamically based on props they receive from their parent components. This will enable us to use components as templates with the ability to render variable content.

We'll continue building the portfolio site we started in the previous labs, and make the content dynamic by using props.

Here is an image of what we want once we are finished:

demo

...and here is a tree view of our component parent-child structure:

└── App
    ├── NavBar
    ├── Home
    └── About
        └── Links

Deliverables

It's recommended that you run npm start and work on this in the browser before running tests. Try to get your app to match the demo! Once you've built out the components below, run npm test or learn test to see if your code passes the tests.

App

About

Links

Resources

react-hooks-props-basics-lab's People

Contributors

maxwellbenton avatar danielseehausen avatar ihollander avatar dependabot[bot] avatar sylwiavargas avatar thuyanduong-flatiron avatar lizbur10 avatar kkterai avatar rrcobb avatar brynknowles 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.