Skip to content

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

@SimerW

Description

@SimerW

import Image from 'rc-image';

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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions