diff --git a/README.md b/README.md index d428991..7a65130 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,8 @@ yarn add svelters-router ## Usage +### Declare route with Route component + ```svelte + + + + +``` + +:bulb: Note that you can combine the two ways of declaring routes. + ### Get route parameters in component Route parameters are compiled by `svelters-router` and given to defined component through a prop named `routeParams`. diff --git a/src/components/Router.svelte b/src/components/Router.svelte index d02d56d..6ef5ef3 100644 --- a/src/components/Router.svelte +++ b/src/components/Router.svelte @@ -1,7 +1,13 @@ +{#each routes as route} + +{/each}