npm install react-router-dom
at index. js import {BrowserRouter as Router} from 'react-router-dom'
A common convention is to create two folders, components and pages. Any component that is used as a piece of UI goes in the components folder, any component meant to act as a "page" of the website goes in pages.
import {Routes, Route} from 'react-router-dom' *** / = homepage
import Home from './Pages/Home' import Stock from './Pages/Stock'
}/> }/> </Routes>
import { Link } from "react-router-dom" export default function Nav(){ return(
app.js <Route path='/stock/:symbol' element={}/>
import { Link } from "react-router-dom"
export default function StockData(props){ const stocks = [
]
return (
return(
<Link to={`/stocks/${symbol}`}>
<h2>{name}</h2>
</Link>
)
})}
https://financialmodelingprep.com/api/v3/quote-short/AAPL?apikey=YOUR_API_KEY [ { "symbol" : "AAPL", "price" : 120.96000000, "volume" : 332607163 } ]
https://financialmodelingprep.com/api/v3/quote-short/AAPL?apikey=59527d605bf847cfae56804dfdc67352
https://financialmodelingprep.com/api/v3/quote/${symbol}?apikey=${process.env.REACT_APP_COINAPI_KEY}