What I want to be able to do is click the Infomation button at the bottom and have that Navigate to another component called MovieInfo.js. Is React Router what is needed to be able to do this? I imported {useHistory} from 'react-router-dom' but I’m not exactly sure how to use it
import React, {useEffect, useState} from 'react';
import './App.css';
import Movies from './Movies.js'
import MovieInfo from './MovieInfo.js';
import {BrowserRouter as Router, Switch, Route} from "react-router-dom";
.
.
.
<Router>
<Switch>
<Route path="/info" component={MovieInfo}></Route>
</Switch>
</Router>
When I go on localhost3000/info it displays a Hello World message along with all the list of movies from the Movies.js component. So where do I go from here. What I want it to be able to do is when I click on Information button on the Movies.js component I want it to display information based of whatever specific movie I clicked
@fkhan698 Look at the thread @Eldhose posted earlier. It contains a good example of how to accomplish what you are wanting to do (without resorting to React Router).