mirror of
https://github.com/cupcakearmy/svelte-i18n.git
synced 2024-11-16 09:59:58 +01:00
docs: ✏️ rename $loading to $isLoading
This commit is contained in:
parent
12f0601215
commit
af732ee2a3
@ -40,16 +40,16 @@ locale.set('en-US')
|
||||
locale.subscribe(() => console.log('locale change'))
|
||||
```
|
||||
|
||||
### `$loading`
|
||||
### `$isLoading`
|
||||
|
||||
While changing the `$locale`, the `$loading` store can be used to detect if the app is currently fetching any enqueued message definitions.
|
||||
While changing the `$locale`, the `$isLoading` store can be used to detect if the app is currently fetching any enqueued message definitions.
|
||||
|
||||
```svelte
|
||||
<script>
|
||||
import { loading } from 'svelte-i18n'
|
||||
import { isLoading } from 'svelte-i18n'
|
||||
</script>
|
||||
|
||||
{#if loading}
|
||||
{#if $isLoading}
|
||||
Please wait...
|
||||
{:else}
|
||||
<Nav />
|
||||
@ -57,4 +57,4 @@ While changing the `$locale`, the `$loading` store can be used to detect if the
|
||||
{/if}
|
||||
```
|
||||
|
||||
> `$loading` will only be `true` if fetching takes more than 200ms.
|
||||
> `$isLoading` will only be `true` if fetching takes more than 200ms.
|
||||
|
Loading…
Reference in New Issue
Block a user