Git Product home page Git Product logo

project-restaurant's Introduction

Project Restaurant

We are going to create a restaurant web page. Which will have two sections

  • A list of menu items with item number, name and price
  • A list of restaurant locations with address and phone number

Setup

  • Fork and clone the repo
  • Run npm install
  • Run npm run dev -- --watch to continuously build React in the background
  • Open index.html in browser to view the result

Tasks

Solve the tasks, one at a time. Each task will require and adjustment to material created in the previous example. Check your work in the browser frequently to make sure all is working.

  • Draw the layout of the website first using pen and paper
  • Create the web page as a single React component in App.js
  • Create a MenuItem and Location component to display respective pieces of information which will be passed in as props.
  • Replace the JSX HTML elements for menu item and location on web page with MenuItem and Location components created for previous exercise. Pass the data to each component to display as props. For example <MenuItem item={{id: 1, name: "Cheeseburger", price: 10 }} />
  • Extract all data in passed to MenuItem and Location components into arrays in state of App. Generate MenuItem and Location component lists by mapping over the data in state and passing each item from the array to each respective component. Use ids as keys.

project-restaurant's People

Contributors

0750kosse avatar dmitrigrabov avatar

Watchers

James Cloos avatar  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.