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

Include defaultProps of component in props passed to connect callback #194

Open
brumm opened this issue Jan 22, 2018 · 0 comments
Open

Include defaultProps of component in props passed to connect callback #194

brumm opened this issue Jan 22, 2018 · 0 comments

Comments

@brumm
Copy link

brumm commented Jan 22, 2018

Hey,

I'd like to be able to specify defaultProps on a Component decorated with connect, and to have those added to the props passed to its callback:

class Foo extends React.Component {}
Foo.defaultProps = {
  bar: 'baz'
}

connect(props => ({
  fetch: `https://some.thing/${props.bar}`
}))

I'd be up for implementing this if there are no objections.

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