Skip to content
This repository was archived by the owner on Sep 23, 2025. It is now read-only.

Conversation

@Aesthetikx
Copy link

Addresses #30, inspired by react-redux/2d3d0beade5

Defaults to true to maintain compatibility.

@LINKIWI
Copy link

LINKIWI commented Jan 1, 2017

Are there any plans to merge this? cc @digidem

index.jsx Outdated
{...this.props}
updateDimensions={this.updateDimensions}
ref='wrappedInstance'
ref={ref}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be condensed to ref={withRef && 'wrappedInstance'}

Stateless components cannot use refs, so this adds the withRef option
(enabled by default for compatibility) which enables or disables passing
the wrappedInstance ref to the wrapped component. Addresses issue awana-archive#30.
Inspired by reduxjs/react-redux@2d3d0be
@Aesthetikx
Copy link
Author

@LINKIWI 👍

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants