September 2024
Intermediate to advanced
174 pages
3h 44m
English
Open the test-driven-carousel project from the previous chapter and start the Vite dev server to serve the project to the browser:
| | $ npm run dev |
| | |
| | VITE v4.4.9 ready in 314 ms |
| | |
| | ➜ Local: http://localhost:5173/ |
| | ➜ Network: use --host to expose |
| | ➜ press h to show help |
Open the URL shown in the output in your browser. You should be greeted by a blank page. Recall that you made the App component generated by Vite an empty placeholder, one that just returns null. Try making it render your Carousel component instead:
| | // src/App.tsx |
| | import Carousel from "./Carousel"; |
| | |
| | export default function App() { |
| | return <Carousel />; |
| | } |
You should now see a pair of Prev and Next buttons. Since the carousel ...
Read now
Unlock full access