react-refetch icon indicating copy to clipboard operation
react-refetch copied to clipboard

Include defaultProps of component in props passed to connect callback

Open brumm opened this issue 8 years ago • 0 comments

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.

brumm avatar Jan 22 '18 13:01 brumm