diff --git a/.changeset/tiny-suns-lick.md b/.changeset/tiny-suns-lick.md new file mode 100644 index 000000000..91740edd9 --- /dev/null +++ b/.changeset/tiny-suns-lick.md @@ -0,0 +1,5 @@ +--- +'slate-react': minor +--- + +Rename `` component prop from `value` to `initialValue` to emphasize uncontrolled nature of it diff --git a/docs/concepts/12-typescript.md b/docs/concepts/12-typescript.md index 51f494379..647cdb05d 100644 --- a/docs/concepts/12-typescript.md +++ b/docs/concepts/12-typescript.md @@ -53,7 +53,7 @@ const App = () => { const [editor] = useState(() => withReact(createEditor())) return ( - + ) diff --git a/docs/general/changelog.md b/docs/general/changelog.md index da54e2c5d..8612a3319 100644 --- a/docs/general/changelog.md +++ b/docs/general/changelog.md @@ -309,7 +309,7 @@ const [value, setValue] = useState(initialValue) const [selection, setSelection] = useState(null) { setValue(value) diff --git a/docs/walkthroughs/01-installing-slate.md b/docs/walkthroughs/01-installing-slate.md index df78cdfab..49f384cc7 100644 --- a/docs/walkthroughs/01-installing-slate.md +++ b/docs/walkthroughs/01-installing-slate.md @@ -81,7 +81,7 @@ const initialValue = [ const App = () => { const [editor] = useState(() => withReact(createEditor())) // Render the Slate context. - return + return } ``` @@ -107,7 +107,7 @@ const App = () => { const [editor] = useState(() => withReact(createEditor())) return ( // Add the editable component inside the context. - + ) diff --git a/docs/walkthroughs/02-adding-event-handlers.md b/docs/walkthroughs/02-adding-event-handlers.md index 254194539..8b509ddc6 100644 --- a/docs/walkthroughs/02-adding-event-handlers.md +++ b/docs/walkthroughs/02-adding-event-handlers.md @@ -20,7 +20,7 @@ const App = () => { const [editor] = useState(() => withReact(createEditor())) return ( - + ) @@ -41,7 +41,7 @@ const App = () => { const [editor] = useState(() => withReact(createEditor())) return ( - + { @@ -71,7 +71,7 @@ const App = () => { const [editor] = useState(() => withReact(createEditor())) return ( - + { if (event.key === '&') { diff --git a/docs/walkthroughs/03-defining-custom-elements.md b/docs/walkthroughs/03-defining-custom-elements.md index 26ab208fb..1adbafa76 100644 --- a/docs/walkthroughs/03-defining-custom-elements.md +++ b/docs/walkthroughs/03-defining-custom-elements.md @@ -18,7 +18,7 @@ const App = () => { const [editor] = useState(() => withReact(createEditor())) return ( - + { if (event.key === '&') { @@ -88,7 +88,7 @@ const App = () => { }, []) return ( - + { }, []) return ( - + { @@ -200,7 +200,7 @@ const App = () => { }, []) return ( - + { diff --git a/docs/walkthroughs/04-applying-custom-formatting.md b/docs/walkthroughs/04-applying-custom-formatting.md index 7208c802c..bf6fd51c3 100644 --- a/docs/walkthroughs/04-applying-custom-formatting.md +++ b/docs/walkthroughs/04-applying-custom-formatting.md @@ -27,7 +27,7 @@ const App = () => { const [editor] = useState(() => withReact(createEditor())) return ( - + { @@ -72,7 +72,7 @@ const App = () => { }, []) return ( - + { @@ -163,7 +163,7 @@ const App = () => { }, []) return ( - + { }, []) return ( - + { }, []) return ( - + { return ( // Add a toolbar with buttons that call the same methods. - +