Skip to content

Check type of payload creator - #129

Merged
globalchubby merged 5 commits into
v1.0.0from
hygiene/check-payload-meta-creators
Nov 4, 2016
Merged

Check type of payload creator#129
globalchubby merged 5 commits into
v1.0.0from
hygiene/check-payload-meta-creators

Conversation

@globalchubby

Copy link
Copy Markdown
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

timche commented Sep 14, 2016

Copy link
Copy Markdown
Member

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.

@globalchubby

Copy link
Copy Markdown
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.

@globalchubby

Copy link
Copy Markdown
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.

@globalchubby

Copy link
Copy Markdown
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

timche commented Oct 6, 2016

Copy link
Copy Markdown
Member

Yes, I changed it.

@BerkeleyTrue

BerkeleyTrue commented Oct 6, 2016

Copy link
Copy Markdown

~~~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

timche commented Nov 1, 2016

Copy link
Copy Markdown
Member

LGTM!

@globalchubby

Copy link
Copy Markdown
Contributor Author

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

@globalchubby
globalchubby 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