ui/ForwardRef
A higher-order component interface for ref forwarding.
Members
Section titled “Members ”ForwardRef Higher-Order Component
Section titled “ForwardRef   Higher-Order Component ”A higher-order component that adapts https://reacthttps://react.dev/reference/react/forwardRef to be chainable with other HOCs.
The following examples are equivalent:
import ForwardRef from '@enact/ui/ForwardRef';
import Component from './Component';
React.forwardRef((props, ref) => (
<Component {...props} setMyRef={ref} />
));
ForwardRef({prop: 'setMyRef'}, Component);
Configuration
String
The prop name to pass the ref callback
Default: 'forwardRef'