Skip to content

Commit

Permalink
Fix code sample (ianstormtaylor#4558)
Browse files Browse the repository at this point in the history
It's an array of CutsomElement, TS complains about it
  • Loading branch information
htulipe authored Sep 29, 2021
1 parent b108491 commit 81cb2ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/walkthroughs/01-installing-slate.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ declare module 'slate' {
```typescript
// Also you must annotate `useState<Descendant[]>` and the editor's initial value.
const App = () => {
const initialValue: CustomElement = []
const initialValue: CustomElement[] = []
const [value, setValue] = useState<Descendant[]>(initialValue)
return (
<Slate value={value} onChange={setValue}>
Expand Down

0 comments on commit 81cb2ae

Please sign in to comment.