Giter VIP home page Giter VIP logo

netflix-react-exercise's Introduction

Netflix (React-Only)

In this exercise you continue the journey into the art of movie apps. You need to create a light version of Netflix, that allows users to store movies into custom lists.

What to expect

React is a component-based library for building user interfaces. Explore how it is much more lightweight than Angular. It still requires you to learn JSX and consider how React's virtual DOM.

You will be using JavaScript's fetch API.

Learning objectives

While you are going through the exercise, keep in mind the following learning objectives. If by the end you don’t feel you have accomplished these objectives, please reach out to an instructor or TA.

  1. Define and use React components in a production-like environment.
  2. Use JSX to produce React elements.
  3. Understand how one-way data flow works with nested components.
  4. Differentiate between container and presentational components.
  5. Explore different frameworks and options you have available, noticing the pros and cons of each one.
  6. Be able to figure out how to setup your environment with the different toolsets needed.
  7. Become confident in your ability to create something in a new language or framework (very handy since you will need this often in your career).
  8. Embrace being uncomfortable while learning new technologies. As we say, get comfortable being uncomfortable!

Getting started

To install the required dependencies, run npm install from the project folder.

Tasks

Follow best practices such as commenting your code, committing often and being mindful of indentation. Make sure to lint your code before committing, as this will help your work look professional.

  1. Use the React CLI to set-up the client folder, running npx create-react-app client. Then from the newly created folder launch your app with npm start.
  2. Build a “Discover” section, rendering the list of movies provided at http://cw-api.eu-west-3.elasticbeanstalk.com/movied/discover.
  3. Build a “My List” section, where users can add and remove movies.
    • If the section is empty, don’t show it.
    • Every movie has an “Add to My List” button, which appears only on mouse hover.
    • Clicking the button adds / removes the movie from “My List” and switches the button between the “plus” and the “tick” sign (you find the required images in the ./assets folder).
    • The logic of this behavior should neither be in the movie render component nor in the movie list component.
  4. Add a couple of unit tests for your app.

Note: remember that when the API returns an image path, you can access that image by prepending https://image.tmdb.org/t/p/w300/ to it.

Extra credits

  • Add another section of movies (e.g. “Action” movies). Keep in mind that when a movie is added to “My List” from any section, its “Add to my list” button should be updated in all lists at the same time.
  • Persist the user data in the browser.

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.