react-transition-group icon indicating copy to clipboard operation
react-transition-group copied to clipboard

maybe support callback ref or props.node?

Open justnewbee opened this issue 3 years ago • 0 comments

What would you like improved?

my code is like below

const [stateDom, setStateDom] = useCallback<HTMLDivElement | null>(null);

<CSSTransition ...>
  <div ref={setStateDom}></div>
</CSSTransition>

and i cannot parse nodeRef to CSSTransition for nodeRef is a Ref.

maybe, in this case, a read dom prop like node can be passed to CSSTransition, like this:

const [stateDom, setStateDom] = useCallback<HTMLDivElement | null>(null);

<CSSTransition ... node={stateDom}>
  <div ref={setStateDom}></div>
</CSSTransition>

justnewbee avatar Mar 01 '22 03:03 justnewbee