heroku / heroku/react-refetch

Include defaultProps of component in props passed to connect callback

Open
#194 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
3.4k
Forks
137
PR merge metrics
No merged PRs in 30d

Description

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:

```js
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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.