Skip to content

[fix] Prevent props warnings from ScrollView in ListView #337

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

Closed
wants to merge 1 commit into from
Closed

[fix] Prevent props warnings from ScrollView in ListView #337

wants to merge 1 commit into from

Conversation

gethinwebster
Copy link
Contributor

As discussed in #260

@necolas
Copy link
Owner

necolas commented Jan 26, 2017

We do something similar in other components. I think the preferred way to do this is to use restructuring to create an object without the ListView props, and spread that when rendering ScrollView:

const {
  aListViewProp,
  anotherListViewProp,
  ...other
} = this.props

<ScrollView {...other} />

@gethinwebster
Copy link
Contributor Author

As not all of the ListView props are used within the render method (initialListSize, renderRow etc), this will end up creating quite a few unused variables - what would be your preferred way to deal with those?

@necolas
Copy link
Owner

necolas commented Jan 27, 2017

@necolas
Copy link
Owner

necolas commented Jan 28, 2017

Thank you. Applied in e06d7a9

@necolas necolas closed this Jan 28, 2017
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

Successfully merging this pull request may close these issues.

2 participants