docs:Update 02-context.md (#15700)

* Update 02-context.md

use `const` for key variable and assign it a symbol instead of empty of object.

* Update documentation/docs/06-runtime/02-context.md

---------

Co-authored-by: Rich Harris <hello@rich-harris.dev>
pull/15705/head
Simon Lund 5 months ago committed by GitHub
parent 8e21c41c27
commit 6a668c4daf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -94,7 +94,7 @@ interface User {}
// ---cut---
import { getContext, setContext } from 'svelte';
let key = {};
const key = {};
/** @param {User} user */
export function setUserContext(user) {

Loading…
Cancel
Save