Skip to content

Commit 3442373

Browse files
authored
Merge pull request #4263 from dafydddev/patch-1
Fix typo in Zustand set function explanation
2 parents ab097c6 + 34adf7f commit 3442373

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/content/6/en/part6a.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ const App = () => {
242242
243243
> #### Where do set and state come from?
244244
>
245-
> Where does <i>set</i> come from? It is a helper function provided by Zustand's <i>create</i> function, used to update the state. <i>create</i> calls the parameter function it receives and automatically passes <i>set</i> to it.Yyou don't need to call or import it yourself; Zustand takes care of that.
245+
> Where does <i>set</i> come from? It is a helper function provided by Zustand's <i>create</i> function, used to update the state. <i>create</i> calls the parameter function it receives and automatically passes <i>set</i> to it. You don't need to call or import it yourself; Zustand takes care of that.
246246
>
247247
> Where does <i>state</i> come from? When a function is given as a parameter to <i>set</i> (instead of a new state object directly), Zustand calls that function with the store's current state as its argument. This way, state-updating functions can access the old state to compute the new one.
248248

0 commit comments

Comments
 (0)