Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
joshnuss authored Oct 22, 2020
1 parent 95560c5 commit 30fb339
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ In Svelte, `useRef()` is `bind:this`.

Context in both frameworks are very similar. One difference is that context in Svelte is not reactive by default. To make it reactive, context data should be wrapped in a store.

Another difference is that context in Svelte does not insert anything into the visual component tree. There is no `<Context.Provider>` element like in React.
Another difference is that context in Svelte does not insert anything into the visual component tree. There is no `<Context.Provider>` element like in React, instead use the `setContext()` function.

[React example](/use-context/react/src/App.js)<br/>
[Svelte example](/use-context/svelte/src/App.svelte)
Expand Down

0 comments on commit 30fb339

Please sign in to comment.