dphilipson / typescript-fsa-reducers

Fluent syntax for defining typesafe reducers on top of typescript-fsa.
MIT License
220 stars 16 forks source link

Support for async actions #25

Open neatnerd opened 6 years ago

neatnerd commented 6 years ago

Added support for ease of use

dphilipson commented 6 years ago

Hey there @neatnerd, really appreciate the contribution!

I'm happy to accept async support, but there's a couple things I'd like to see in this PR before I merge it:

neatnerd commented 6 years ago

Thank you very much for a prompt feedback. Before I proceed - couple of comments/questions:

dphilipson commented 6 years ago

Hi again,

You're right that a test probably isn't strictly necessary to check correctness since as you said it is a simple wrapper. But a benefit of writing a test is to make sure this API plays nicely with action creators defined using actionCreator.async() from typescript-fsa. Since the point of async handlers here is to integrate with typescript-fsa, it's worthwhile to write out a test to demonstrate that this actually happens and also to give an example of doing so.

raynor85 commented 5 years ago

I suggest to remove package-lock.json and rely on yarn.lock instead, since it is already present.