0.9.0
Pre-release
Pre-release
Update
-
BREAKING: Move
key
property fromattributes
to transform implementation's own properties. This means you have to passkey
property to a component manuallyBefore
v0.9.0
import {isLink, isText, createElementTransform, createLeafTransform} from "slate-to-react" export const Link = createElementTransform( isLink, ({attributes, element, children}) => ( <a {...attributes} href={element.url}> {children} </a> ) ) export const Text = createLeafTransform( isText, ({children}) => <span>{children}</span> )
Since
v0.9.0
import {isLink, isText, createElementTransform, createLeafTransform} from "slate-to-react" export const Link = createElementTransform( isLink, ({key, attributes, element, children}) => ( <a {...attributes} href={element.url} key={key}> {children} </a> ) ) export const Text = createLeafTransform( isText, ({key, children}) => <span key={key}>{children}</span> )
All changes: v0.8.0...v0.9.0