makeomatic / makeomatic/redux-connect
HOC with wrapped component with asyncConnect
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 545
- Forks
- 61
- PR merge metrics
- No merged PRs in 30d
Description
Hi! Is it possible to make HOC which wraps asyncConnect'ed component. I can't do this. Because all asyncItems, mapStateToProps and mapDispatchToProps of the Component seem to be dropped.
Say, I've got the Component:
```
...
const mapStateToProps = state => ({
...
});
const asyncItems = [{
key: 'myItems',
promise: ({router, store: { dispatch, getState }}) => {}
}];
const enhancer = createHOC();
module.exports = enhancer(asyncConnect(
asyncItems,
mapStateToProps,
mapDispatchToProps,
)(Component));
```
And HOC itself has the asyncConnect enhancer :)
Is it possible or do I have to abandon this idea at all?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by examining the HOC and asyncConnect composition described in the issue, focusing on how asyncItems, mapStateToProps, and mapDispatchToProps are preserved. Determine whether nested enhancers can retain these values and define the expected behavior for a wrapped asyncConnect'ed component.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100