Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Help] "extends React.PureComponent" #20

Open
ebellumat opened this issue Aug 19, 2018 · 0 comments
Open

[Help] "extends React.PureComponent" #20

ebellumat opened this issue Aug 19, 2018 · 0 comments

Comments

@ebellumat
Copy link

I own some classes written this way:

class PivotTable extends React.PureComponent {
  render() {
    const Renderer = this.props.renderers[
      this.props.rendererName in this.props.renderers
        ? this.props.rendererName
        : Object.keys(this.props.renderers)[0]
    ];
    return <Renderer {...this.props} />;
  }
}

But, the output, I do not think it's appropriate conversion to Vue.

class PivotTable extends React.PureComponent {
  render() {
    const Renderer = this.props.renderers[this.props.rendererName in this.props.renderers ? this.props.rendererName : Object.keys(this.props.renderers)[0]];
    return <Renderer {...this.props} />;
  }

}

What would be the correct equivalent conversion? Is this in the plans to enter Lib?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant