Topics:
- React Router
- Passing Route Parameters
- Fork this repository, then clone your fork.
- Run
yarnornpm installto download dependencies. - Run the server using
yarn start,npm startornode server.js. - In a separate terminal cd into the
clientfolder and runyarnornpm installto download dependencies. - Still inside the
clientfolder runyarn startornpm startto run the client application. - Inside
/client/src/index.jsadd two routes.- one route for
/that loads theMovieListcomponent. - one route that will take an
idparameter after/movies/(ex:/movies/2,/movies/3where the id is dynamic). This route should load theMoviecomponent.
- one route for
- When a user clicks on a movie card they should be taken to
/movies/id of movie hereto see the details for the selected movie. - Add a link back to the home page from the
Moviecomponent inside/client/src/Movies/Movie.js. - Modify line 12 on the
Moviecomponent to read the id from the URL.