0
0
mirror of https://github.com/sveltejs/svelte.git synced 2024-12-01 17:30:59 +01:00

[docs] fix typo in Context API tutorial (#7063)

This commit is contained in:
Maxi Ferreira 2021-12-27 22:03:36 -08:00 committed by GitHub
parent 6f2ebaa76d
commit 72d40e99b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,7 +11,7 @@ There are two halves to the context API — `setContext` and `getContext`. If a
Let's set the context first. In `Map.svelte`, import `setContext` from `svelte` and `key` from `mapbox.js` and call `setContext`:
```js
import { onMount, setContext } from 'svelte';
import { onDestroy, setContext } from 'svelte';
import { mapbox, key } from './mapbox.js';
setContext(key, {