7

Advanced Routing Techniques

With everything we’ve covered so far, you could set this book down now and go build a simple website using SvelteKit. But if you wanted to build more advanced functionality into your application, you might find yourself struggling to come up with the proper hierarchies for routes. That’s because when it comes to dynamic routing, we’ve only scratched the surface. In Chapter 4, we discussed creating dynamic pages with parameters passed to our routes. In that example, we loaded articles by using the provided slug and matching it with those found in our demonstration database. We had no way of knowing what the slug would be ahead of time and it would have been needlessly complicated to create a new route for each article. ...

Get SvelteKit Up and Running now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.