Module: @lexical/react/useLexicalSubscription
References
default
Renames and re-exports useLexicalSubscription
Type Aliases
LexicalSubscription
Ƭ LexicalSubscription<T
>: Object
Type parameters
Name |
---|
T |
Type declaration
Name | Type |
---|---|
initialValueFn | () => T |
subscribe | (callback : (value : T ) => void ) => () => void |
Defined in
packages/lexical-react/src/useLexicalSubscription.tsx:15
Functions
useLexicalSubscription
▸ useLexicalSubscription<T
>(subscription
): T
Shortcut to Lexical subscriptions when values are used for render.
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
subscription | (editor : LexicalEditor ) => LexicalSubscription <T > |
Returns
T