Qwik City (routing)
aka. Qwik Router
Learning Qwik and Qwik City are not two different things, Qwik City is built on top of Qwik, bringing opiniated routing and goodies to make your life easier.
Qwik¹: Core framework, stable, primitives, component model.
City²: Opiniated file-based router, build fast.
Qwik (core) and Qwik City (routing) solve problems at two layers of abstraction. Qwik can stay stable, without breaking changes, focusing on long-term and stable primitives, while Qwik City brings an opiniated and performant way to build sites at scale. We don't want to lock the ecosystem into a single correct way of building sites, in fact we encourge the community to build alternative solutions on top Qwik.
As a user, using Qwik City today for your app is a no-brainer. Thanks to Qwik architecture, it comes with zero overhead, meaning that no extra JS will be delivered to the browser.
Qwik City provides:
- Directory-based routing
- Nested layouts
- File-based menus
- Support authoring content with
- Data endpoints
By default, Qwik City sites are fast because they:
- Are resumable
- Come with Partytown
To follow along with this guide, run the Qwik CLI in your command line:
npm create qwik@latest
When prompted, choose a name for your project and Qwik City as your starter.