Entry point
BrowserRouter is mounted at the very top of the React tree in src/main.jsx, wrapping the entire App component:
BrowserRouter uses the HTML5 History API (pushState / replaceState) to keep the URL bar in sync with the active view without triggering a server request.
Route configuration
All routes are declared insrc/App.jsx inside a single <Routes> block:
<Navbar /> sits outside <Routes> so it is rendered on every page without being re-mounted on navigation.
Routes
Home
Path:
/Component: HomeDisplays the top 20 cryptocurrencies ranked by market cap, fetched via keepInfo() from the caching layer.Grafics
Path:
/graficsComponent: GraficsInteractive price history charts. Fetches OHLC data for a selected coin and time range via keepHistory(cryptoId, days).Favorites
Path:
/favsComponent: FavoritesLists coins the user has starred. Reads from the FavoritesContext — no additional API call is needed if the coin data is already cached.News
Path:
/newsComponent: NewsSpanish-language market news fetched from CryptoCompare via keepNews(). Articles open in a new browser tab.Converter
Path:
/converterComponent: ConverterPageCurrency converter for a fixed set of coins. Spot prices are fetched via keepPrice() and used to calculate conversion amounts in real time.Navbar
TheNavbar component provides the navigation links that move between routes. Because it is rendered outside <Routes> in App.jsx, it persists across every page transition and does not unmount when the active route changes. It also consumes useColorMode() to render the dark/light mode toggle.