Skip to content

Image组件是否可以使用forwardRef定义,目前无法传入ref #372

Description

@SimerW

import Image from 'rc-image';

export const MyComponent = () {
const ref = useRef(null)
return <Image src="XXX" ref={ref}
}

上述场景中想要传入ref到Image组件内部,绑定在img元素上,但是目前无法实现

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions