From 2546f5684860025863c3ed724cbb212d5eda55b4 Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Fri, 15 Nov 2024 16:30:50 +0100 Subject: [PATCH] [core] Polish useForkRef docs --- packages/mui-utils/src/useForkRef/useForkRef.ts | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/packages/mui-utils/src/useForkRef/useForkRef.ts b/packages/mui-utils/src/useForkRef/useForkRef.ts index e4fd69ecb94a46..521c97d3f93d85 100644 --- a/packages/mui-utils/src/useForkRef/useForkRef.ts +++ b/packages/mui-utils/src/useForkRef/useForkRef.ts @@ -4,22 +4,19 @@ import setRef from '../setRef'; /** * Takes an array of refs and returns a new ref which will apply any modification to all of the refs. - * - * This is useful when you want have the ref used in multiple places. + * This is useful when you want to have the ref used in multiple places. * * ```tsx - * const newRef = React.useRef(null); - * const refFork = useForkRef(newRef, props.ref); + * const rootRef = React.useRef(null); + * const refFork = useForkRef(rootRef, props.ref); * * return ( - * - * - * + * * ); * ``` * - * @param {Array | undefined>} refs the ref array. - * @returns {React.RefCallback | null} the new ref callback. + * @param {Array | undefined>} refs The ref array. + * @returns {React.RefCallback | null} The new ref callback. */ export default function useForkRef( ...refs: Array | undefined>