Question · Svelte and SvelteKit course · Module 4: Props and Events

Setting and Getting Context

Which functions from the svelte package set and get a context by key?

Answer options

  • useContext and createProvider
  • setContext and getContext
  • provideContext and injectContext
  • $context.set and $context.get

You can check the correct answer by solving this task in the CodeWorlds game.