mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-02-15 12:44:38 +01:00
Propose to flush change immediately instead of delaying it using `setTimeout()`. - Flushing change is only use for `props.onChange()` callback and invoked at the end of render lifecycle (didMount/didUpdate), can't find the rationale for delaying it. - `setTimeout()` delay are not dependable for a predictive behaviour - `onChange()` is an important callback for a controlled component, delaying it can cause race condition. e.g. any changes outside of the component lifecycle that happen between the delay of flushing change will be overridden
Packages
Slate's codebase is monorepo managed with Lerna. It consists of a handful of packages—although you won't always use all of them. They are:
Package | Version | Size | Description |
---|---|---|---|
slate |
Slate's core data model logic. | ||
slate-base64-serializer |
A Base64 string serializer for Slate documents. | ||
slate-html-serializer |
An HTML serializer for Slate documents. | ||
slate-hyperscript |
A hyperscript tool to write JSX Slate documents! | ||
slate-plain-serializer |
A plain text serializer for Slate documents. | ||
slate-prop-types |
React prop types for checking Slate values. | ||
slate-react |
React components for rendering Slate editors. | ||
slate-simulator |
A simulator for testing Slate editors and plugins. |