Giter Site home page Giter Site logo

moviewatch's Introduction

Moviewatch ๐ŸŽฅ

Moviewatch App typescript challenge, using React, Apollo and Typescript, You'll build an app to let you keep track of the movies you'd like to watch.

Installation:

  1. Bring up the API and Database:
cd backend && npm install && docker-compose up
  1. Bring up the Frontend development server:
cd frontend && npm install && npm start

Challenges:

  1. Begin by using the useQuery Apollo hook to make a new GraphQL query to retrieve all the movies, display the movies within the Movies Screen component. You can place your query within models/movies/queries.ts

    Tip: Use the GraphQL Schema documentation at localhost:5000 to help construct your query

    Tip: Writing a query

  2. Now try converting the Movies component to Typescript! Head to frontend/screens/Movies/index.js and convert to a .tsx Typescript component.

    Tip: Use the GraphQL Schema documentation at localhost:5000 to help write the interface for a movie!

    Tip: Using Apollo With Typescript

  3. Convert the MovieCard component to Typescript! Head to frontend/screens/Movies/components/MovieCard.js and convert to a .tsx Typescript component.

  4. In the Movies component, create a mutation which adds a movie to your watch list when clicked. Don't forget to type your mutation!

    Tip: Use the schema documentation

    Tip: Apollo useMutation hook

  5. Within the WatchList component write a query to retrieve all the movies in your watch list. You can use the WatchListItem component to render the movies you're watching!

  6. Estimate your binge! Within the footer area of the WatchList component, create a new component that displays the total run time of all the films in your watch list.

  7. You should now have a couple different queries/mutations in the /models directory, try running cd frontend && npm run schema:update to automatically generate Typescript interfaces for your queries and mutations.

  8. Refactor your components to remove your handwritten types and use the auto generated Typescript types instead.

moviewatch's People

Contributors

ollieri3 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.