Skip to content
Myr

docs(typescript): highlight the extra parenthesis for `create` (#1410)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

* docs(typescript): highlight the extra parenthesis for `create` * fix typo

authored by Devansh Jethmalani · committed by GitHub · parent d3596a6 · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:docs/guides/typescript.md+1 added-1 removed
3 unmodified lines
4---56## Basic usage78The difference when using TypeScript is that instead of writing `create(...)`, you have to write `create<T>()(...)` where `T` is the type of the state to annotate it. For example:8The difference when using TypeScript is that instead of writing `create(...)`, you have to write `create<T>()(...)` (notice the extra parenthesis `()` too along with the type parameter) where `T` is the type of the state to annotate it. For example:910```ts11import create from 'zustand'12
397 unmodified lines