Coder Social home page Coder Social logo

react-hooks-dq-components's Introduction

Discussion Questions: Components

Get together in groups and clone down this repository. Your goal for this discussion question is to recreate the app in this demo image:

demo

The components are already provided for you in the src/components folder. It's your job to put them all together!

Start by discussing the image of the demo app and decide what components belong where. For example, here's how you might break up a site like Yelp into components:

yelp components

Once you've decided on your component hierarchy, it's time to start coding!

First, run the application in the browser:

$ npm install
$ npm start

Starting from the App component, add all the necessary components based on your component hierarchy. For example, if you decided to put the TopMenu and SideMenu in the App component, here's how it would look:

import React from "react";
import TopMenu from "./TopMenu";
import SideMenu from "./SideMenu";

function App() {
  return (
    <div className="app-container">
      <TopMenu />
      <SideMenu />
    </div>
  );
}

export default App;

Make sure to check your progress in the browser as you start adding components and work on getting your app to match the demo image.

Bonus

If you finish early, have a look at the AlbumList component. You'll notice there is an array of album data being imported in this file:

import { albums } from "../data/albums";

See if you can use this array to dynamically generate the Album components instead of hard-coding them.

Check out the React docs on Lists and Keys for a hint!.

react-hooks-dq-components's People

Contributors

graciemcguire avatar ihollander 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.