From 1e5b7f67ed685cb780a9e06f5c80130f9b73718e Mon Sep 17 00:00:00 2001 From: Puru Vijay Date: Sat, 1 Apr 2023 01:28:16 +0530 Subject: [PATCH] Modernize docs links --- .../01-getting-started/03-component-format.md | 12 +++++------ .../04-element-directives.md | 6 +++--- .../05-component-directives.md | 2 +- .../02-template-syntax/06-special-elements.md | 8 ++++---- site/content/docs/03-runtime/01-svelte.md | 4 ++-- .../docs/03-runtime/02-svelte-store.md | 6 +++--- .../docs/03-runtime/03-svelte-motion.md | 4 ++-- .../docs/03-runtime/04-svelte-transition.md | 20 +++++++++---------- .../docs/03-runtime/05-svelte-animate.md | 4 ++-- .../02-client-side-component-api.md | 2 +- .../03-server-side-component-api.md | 2 +- .../04-custom-elements-api.md | 4 ++-- .../01-introduction/01-basics/text.md | 2 +- .../01-introduction/06-making-an-app/text.md | 2 +- .../08-stores/04-derived-stores/text.md | 2 +- .../tutorial/09-motion/02-spring/text.md | 2 +- .../19-next-steps/01-congratulations/text.md | 2 +- 17 files changed, 42 insertions(+), 42 deletions(-) diff --git a/site/content/docs/01-getting-started/03-component-format.md b/site/content/docs/01-getting-started/03-component-format.md index 7e678495ff..7a3b409550 100644 --- a/site/content/docs/01-getting-started/03-component-format.md +++ b/site/content/docs/01-getting-started/03-component-format.md @@ -24,7 +24,7 @@ A ` ``` -Readonly props can be accessed as properties on the element, tied to the component using [`bind:this` syntax](/docs/template-syntax#component-directives-bind-this). +Readonly props can be accessed as properties on the element, tied to the component using [`bind:this` syntax](/docs/component-directives#bind-this). You can use reserved words as prop names. @@ -203,7 +203,7 @@ If a statement consists entirely of an assignment to an undeclared variable, Sve ### 4. Prefix stores with `$` to access their values -A _store_ is an object that allows reactive access to a value via a simple _store contract_. The [`svelte/store` module](/docs/run-time#svelte-store) contains minimal store implementations which fulfil this contract. +A _store_ is an object that allows reactive access to a value via a simple _store contract_. The [`svelte/store` module](/docs/svelte-store) contains minimal store implementations which fulfil this contract. Any time you have a reference to a store, you can access its value inside a component by prefixing it with the `$` character. This causes Svelte to declare the prefixed variable, subscribe to the store at component initialization and unsubscribe when appropriate. @@ -234,7 +234,7 @@ Local variables (that do not represent store values) must _not_ have a `$` prefi store = { subscribe: (subscription: (value: any) => void) => (() => void), set?: (value: any) => void } ``` -You can create your own stores without relying on [`svelte/store`](/docs/run-time#svelte-store), by implementing the _store contract_: +You can create your own stores without relying on [`svelte/store`](/docs/svelte-store), by implementing the _store contract_: 1. A store must contain a `.subscribe` method, which must accept as its argument a subscription function. This subscription function must be immediately and synchronously called with the store's current value upon calling `.subscribe`. All of a store's active subscription functions must later be synchronously called whenever the store's value changes. 2. The `.subscribe` method must return an unsubscribe function. Calling an unsubscribe function must stop its subscription, and its corresponding subscription function must not be called again by the store. @@ -250,7 +250,7 @@ You can `export` bindings from this block, and they will become exports of the c You cannot `export default`, since the default export is the component itself. -> Variables defined in `module` scripts are not reactive — reassigning them will not trigger a rerender even though the variable itself will update. For values shared between multiple components, consider using a [store](/docs/run-time#svelte-store). +> Variables defined in `module` scripts are not reactive — reassigning them will not trigger a rerender even though the variable itself will update. For values shared between multiple components, consider using a [store](/docs/svelte-store). ```svelte