GitHub Hot Board

GitHub Hot Board · 저장소 아카이브

learn-co-curriculum/react-hooks-components-basics-lab

이 언어 소개가 아직 없습니다. 수집되면 자동 표시됩니다.

HTML

데이터 기준 October 29learn-co-curriculum

최고 순위

#158

포크의 왕

8

누적 스타

7.9K

포크 수

2

최근 30일 기록 일수

라이선스: NOASSERTION최근 push: June 7열린 이슈(PR 포함): 172026-10-25부터 수집. 미확인 = 아직 미수집

프로젝트 문서

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 runnpm test to check your work.

Deliverables

  • Two components, <Navbar> and <Home>, are already defined in the App.js file. Add both of these components as child components of <App> by including them in the return statement for the App function.

  • 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. To match the screenshot, the div should contain an <h2> element with the text "About." However, as long as it has an id of about, it will pass the test!

Hint: If you're stuck, try using the screen.debug method in the test file to see what DOM elements are being returned by your <App> component. If you still need help, this lab (and others) have a solution branch on GitHub where you can see one possible solution to this lesson.

Resources

현재 순위

  • 158

    포크의 왕

    8 스타 · 7.9K fork · 누적 포크 수

    포크왕 →

최근 30일 추이

누적 스타 추이

순위 추이

README에 뱃지를 붙여보세요 · learn-co-curriculum/react-hooks-components-basics-lab[![README에 뱃지를 붙여보세요](https://git.vaiox.xyz/api/badge/learn-co-curriculum/react-hooks-components-basics-lab.svg)](https://git.vaiox.xyz/ko/repo/learn-co-curriculum/react-hooks-components-basics-lab)

Badge · 任何仓库都可以挂 —— 未上榜的仓库显示灰章,上完榜会自动点亮。

<a href="https://git.vaiox.xyz/ko/repo/learn-co-curriculum/react-hooks-components-basics-lab"><img src="https://git.vaiox.xyz/api/badge/learn-co-curriculum/react-hooks-components-basics-lab.svg" alt="README에 뱃지를 붙여보세요" height="20"></a>

← 랭킹으로

GitHub Hot Board타임머신발견联系我们 · Contact