mirror of
https://github.com/cupcakearmy/svelte-i18n.git
synced 2024-09-28 15:14:45 +02: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'))
|
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
|
```svelte
|
||||||
<script>
|
<script>
|
||||||
import { loading } from 'svelte-i18n'
|
import { isLoading } from 'svelte-i18n'
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if loading}
|
{#if $isLoading}
|
||||||
Please wait...
|
Please wait...
|
||||||
{:else}
|
{:else}
|
||||||
<Nav />
|
<Nav />
|
||||||
@ -57,4 +57,4 @@ While changing the `$locale`, the `$loading` store can be used to detect if the
|
|||||||
{/if}
|
{/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