Navigation and Persistence
25 min read
Connect the Rates Page
Connect the Rates Page
Open components/RatesTable.js and add the same current-rate request used by the converter.
Keep the table responsible for its own data loading because the Rates page can render independently from the Convert page.
const [rates, setRates] = useState(fallbackRates);
const [live, setLive] = useState(false);
Render a clear live/demo label above the table.
Test it
Open /rates, wait for the request to complete, and verify that the rows use the returned values.
Checkpoint
The Rates page works as an independent live-data view.