Git Product home page Git Product logo

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

React Components Basics Lab

Learning Goals

  • Write basic React components
  • Return one React component from another component

Instructions

In the labs throughout this section, we'll be working on building a small portfolio site in React.

Our goal for the first lesson is to get the basic components for our app — the <Navbar>, <Home>, and <About> components — to be returned from the <App> component.

Once we're done, we should get something like this:

app demo

For this lab, we will be rendering a few children components in our top-most component: App. All of our work will be done in src/components/App.js. The rest of the files shouldn't need any changes.

To set up the app and run it in the browser, run:

npm install
npm start

To start, work on getting the app to match the screenshot above. Then, open up a second terminal (open to the same directory), and run learn test or npm test to check your work.

Deliverables

  • Two components, <Navbar> and <Home>, are already defined in the App.js file. Display both of these components as child components of <App>.

  • Create a third component, <About>. The <About> component should also be a child component of <App>.

    • The <About> component should return a <div> with an id of about. The div can also optionally have some additional text content and other elements inside — as long as it has an id of about, it will pass the test!

Resources

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

Contributors

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