Skip to content

withLocalization decorator removes component ref #327

@hkasemir

Description

@hkasemir

https://github.com/projectfluent/fluent.js/blob/master/fluent-react/src/with_localization.js#L46

createElement does not forward the ref applied to its wrapped component.

for example say I have a page component with a form component, and I want to attach a ref to the form from the page to control focus on inputs. wrapping the form component with withLocalization breaks that ref.

I'm not sure if there's a way to use cloneElement instead, as this forwards refs?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions