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 f97403a commit 811f7bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ In Svelte, `useRef()` is `bind:this`.

## useContext

Context in both frameworks are very similar. One difference is that context is not reactive in Svelte. To make it reactive, you can put a store in the context value.
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>`.
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.

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

0 comments on commit 811f7bc

Please sign in to comment.