mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-26 16:44:22 +02:00
docs: Fix installing slate to pass prettier
This commit is contained in:
@@ -65,12 +65,17 @@ declare module 'slate' {
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
```typescript jsx
|
||||
// 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}>...</Slate>
|
||||
return (
|
||||
<Slate value={value} onChange={setValue}>
|
||||
...
|
||||
</Slate>
|
||||
)
|
||||
}
|
||||
```
|
||||
|
||||
|
Reference in New Issue
Block a user