@lexical/react
Version:
This package provides Lexical components and hooks for React applications.
10 lines (8 loc) • 519 B
JavaScript
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
import{useExtensionDependency as t}from"@lexical/react/useExtensionComponent";import{useMemo as n,useSyncExternalStore as e}from"react";function o(t){const[o,r]=n(()=>[t.subscribe.bind(t),t.peek.bind(t)],[t]);return e(o,r,r)}function r(n,e){return o(t(n).output[e])}export{r as useExtensionSignalValue,o as useSignalValue};