Skip to content

Check type of payload creator #129

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

Merged
merged 5 commits into from
Nov 4, 2016

Conversation

yangmillstheory
Copy link
Contributor

This takes care of the first example in the createAction spec outlined here.

This contains breaking changes, so it might be worth including in #122.

@timche
Copy link
Member

timche commented Sep 14, 2016

With the increase of checks and errors, I'd suggest to use invariant. It is already optimised for development and production with checking process.env.NODE_ENV.

We can start to using it in this PR and open a new PR for all other errors.

@yangmillstheory
Copy link
Contributor Author

Using invariant per your suggestion now.

Can you explain the behavior when process.env.NODE_ENV === 'production? I'm not familiar with this library and couldn't quite figure it out via the README.

From my point of view the main benefit is reducing the boilerplate of throwing errors on certain conditions.

@yangmillstheory
Copy link
Contributor Author

For the invariant usage, I decided not to go with this approach, since the original error message is actually shorter than the "minified exception" message.

@yangmillstheory
Copy link
Contributor Author

@timche is it possible to change the base branch to v1.0.0?

@timche timche changed the base branch from master to v1.0.0 October 6, 2016 15:25
@timche
Copy link
Member

timche commented Oct 6, 2016

Yes, I changed it.

@BerkeleyTrue
Copy link

BerkeleyTrue commented Oct 6, 2016


~~~I've always used `null` when I want to omit an argument instead of undefined. I'm still hesitant to use `undefined`.~~~

After some further research, I've decided to move to using `void 0` in my code.

@timche
Copy link
Member

timche commented Nov 1, 2016

LGTM!

@yangmillstheory
Copy link
Contributor Author

@timche with this merge, v.1.0.0 is good to go.

@yangmillstheory yangmillstheory merged commit d637167 into v1.0.0 Nov 4, 2016
timche pushed a commit that referenced this pull request Nov 18, 2016
@timche timche deleted the hygiene/check-payload-meta-creators branch April 18, 2018 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants