Movatterモバイル変換


[0]ホーム

URL:


Skip to main content
SvelteKitReference

$app/stores

This module contains store-based equivalents of the exports from$app/state. If you’re using SvelteKit 2.12 or later, use that module instead.

import{
functiongetStores():{page:typeofpage;navigating:typeofnavigating;updated:typeofupdated;}
getStores
,constnavigating:Readable<Navigation|null>

A readable store.When navigating starts, its value is aNavigation object withfrom,to,type and (iftype === 'popstate')delta properties.When navigating finishes, its value reverts tonull.

On the server, this store can only be subscribed to during component initialization. In the browser, it can be subscribed to at any time.

@deprecatedUsenavigating from$app/state instead (requires Svelte 5,see docs for more info)
navigating
,constpage:Readable<Page<Record<string,string>,string|null>>

A readable store whose value contains page data.

On the server, this store can only be subscribed to during component initialization. In the browser, it can be subscribed to at any time.

@deprecatedUsepage from$app/state instead (requires Svelte 5,see docs for more info)
page
,
constupdated:Readable<boolean>&{check():Promise<boolean>;}

A readable store whose initial value isfalse. Ifversion.pollInterval is a non-zero value, SvelteKit will poll for new versions of the app and update the store value totrue when it detects one.updated.check() will force an immediate check, regardless of polling.

On the server, this store can only be subscribed to during component initialization. In the browser, it can be subscribed to at any time.

@deprecatedUseupdated from$app/state instead (requires Svelte 5,see docs for more info)
updated
}from'$app/stores';

getStores

functiongetStores():{page:typeofpage;navigating:typeofnavigating;updated:typeofupdated;};

navigating

Usenavigating from$app/state instead (requires Svelte 5,see docs for more info)

A readable store.When navigating starts, its value is aNavigation object withfrom,to,type and (iftype === 'popstate')delta properties.When navigating finishes, its value reverts tonull.

On the server, this store can only be subscribed to during component initialization. In the browser, it can be subscribed to at any time.

constnavigating:import('svelte/store').Readable<import('@sveltejs/kit').Navigation|null>;

page

Usepage from$app/state instead (requires Svelte 5,see docs for more info)

A readable store whose value contains page data.

On the server, this store can only be subscribed to during component initialization. In the browser, it can be subscribed to at any time.

constpage:import('svelte/store').Readable<import('@sveltejs/kit').Page>;

updated

Useupdated from$app/state instead (requires Svelte 5,see docs for more info)

A readable store whose initial value isfalse. Ifversion.pollInterval is a non-zero value, SvelteKit will poll for new versions of the app and update the store value totrue when it detects one.updated.check() will force an immediate check, regardless of polling.

On the server, this store can only be subscribed to during component initialization. In the browser, it can be subscribed to at any time.

constupdated:import('svelte/store').Readable<boolean>&{check():Promise<boolean>;};

Edit this page on GitHub llms.txt


[8]ページ先頭

©2009-2025 Movatter.jp