GithubHelp home page GithubHelp logo

project-movies's Introduction

Project Movies

The goal for this week was to use themoviedb.org's API to fetch a list of movies, display them on a page, and then link to a movie detail page when you click on the movie. The focus for this week was to use React router to create multi-page applications, use placeholders in urls to pick dynamic parts from urls and to practice using APIs in React - combining useState with useEffect.

The project

The website is strucutred with three different page-types:

  • a movie list home page where the movie cards are displayed, together with title and release date when the user hovers over the card. path '/'.
  • a movie detail page for each movie. When the user clicks on a movie card in the movie list they are redirected here. path '/movies/movieid'
  • a not found page. The user is redirected here if the user lands on a 404 page. It has a link that redirects the user back to the movie list page.'¨

I used the React router hook in the app.js component, with routes with differnt paths to create a page structure and Switch to render one page at a time. The fetches are done in the seperate movie pages to get the data needed and then stored in the created useState hooks for each page. I also implemented a loader that is displayed before the fetch for each page is done. For the css, I maninly worked with flex-box to structure the layout. I learned a lot about working with different layers and getting them to cover the entire container/page. The team shared a lot of css-tricks on slack this week which was super helpful!

TECH

  • React
  • JSX
  • Javascript
  • API
  • CSS
  • HTML

View it live

https://popularmoviesproject.netlify.app/

project-movies's People

Contributors

ellenbjo avatar idlefingers avatar emolsz avatar dependabot[bot] avatar jenniedalgren avatar puj 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.