Skip to content
This repository was archived by the owner on Apr 29, 2021. It is now read-only.
This repository was archived by the owner on Apr 29, 2021. It is now read-only.

Request for a softFindWithRef #20

@rjokelai

Description

@rjokelai

A softer version of findWithRef would be beneficial when, e.g., hiding components:

class Foo extends Component {
  render() {
    return (<div>
      {this.props.show ? <span ref="bar">Text</span> : undefined}
    </div>)
  }
}

With <Foo show={false} /> the span will be hidden so softFindWithRef(component, 'bar') would return e.g., undefined instead of throwing error

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions