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

catch unwanted removal of returning a dispatch #52

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

briziel
Copy link

@briziel briziel commented Jun 13, 2018

Hi,

Thank you for your awesome work. I want to propose this PR, because me and some folks of my team are running into an issue which is hard to identify and VERY time consuming.

const redial = { fetch: ({ dispatch, httpClient, props }) => dispatch(loadThings(httpClient, props.things)) };

When you have a redial object like this, you have no hint that it is necessary for fetch to return a promise. This is going to be a problem when you start debugging and put curly braces around the body of arrow function.

const redial = { fetch: ({ dispatch, httpClient, props }) => { console.log("props", props); dispatch(loadThings(httpClient, props.things)); } };

I couldn't think of any usecase where you don't want to return a promise to resolve after async operation. Maybe i'am wrong. What do you think?

greetings
Fabricius

@coveralls
Copy link

Coverage Status

Coverage decreased (-2.4%) to 97.561% when pulling 9e3ef4c on briziel:master into 3ef620b on markdalgleish:master.

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