Skip to content

Commit

Permalink
fix(docs): changed cloneDeep to deepClone (#951)
Browse files Browse the repository at this point in the history
* changed cloneDeep to deepClone

* fixed typo
  • Loading branch information
overthemike committed Sep 16, 2024
1 parent e5209d7 commit 2587214
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/how-tos/how-to-reset-state.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const initialObj = {
const state = proxy(deepClone(initialObj))

const reset = () => {
const resetObj = deepCLone(initialObj)
const resetObj = deepClone(initialObj)
Object.keys(resetObj).forEach((key) => {
state[key] = resetObj[key]
})
Expand All @@ -34,7 +34,7 @@ Alternatively, you can store the object in another object, which make the reset
const state = proxy({ obj: initialObj })

const reset = () => {
state.obj = cloneDeep(initialObj)
state.obj = deepClone(initialObj)
}
```

Expand Down

0 comments on commit 2587214

Please sign in to comment.