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

Elm it up #30

Merged
merged 1 commit into from
Jul 1, 2016
Merged

Elm it up #30

merged 1 commit into from
Jul 1, 2016

Conversation

yoshuawuyts
Copy link
Owner

This is pretty much a complete rewrite of barracks, catered for choo; it now has a better split out architecture that caters to all forms of async problems. In essence it's quite similar to choo@2; but adds composition for effects (as per choojs/choo#34).

There's also a notion of handlers that can react to state changes, errors and actions (as per choojs/choo#15). This API is slightly awkward I've found that each handler is slightly different; but I reckon they're good enough. The only point of debate would be whether or not to make the caller argument an array to display the full stack trace; and to add the caller to the onError handler. The latter adding a reasonable source of complexity for information that's available already despite in a shittier format. Input here would be heaps valued.

Also we're not 100% test covered (sitting closer to 70%); but I've run this off every example in choo and it seems to work soooo ✨

I'd suggest reading the README.md file for a full overview of the new API. Thanks!

This patch enables `barracks` to be used as the core of `choo`. It
solves the previous questions that were left unanswered in the FAQ
- [x] write docs
- [x] write code
- [x] write tests

Commits
=======
- fixup! allow extending of state
- fixup! _send change arg order
- fixup! pass createSend() instead of send()
- fixup! perfffff for handlers oi
- fixup! if statements? nah
- fixup! actually pass the argument hey
- fixup! make tests pass oi
- fixup! update docs for createSend()
- fixup! bump travis
- fixup! add model tests
- fixup! more start tests
- fixup! document internals
- fixup! test nested effects
- fixup! test subscriptions
- fixup! add done() to subs
- fixup! add onState tests
- fixup! add onAction test
- fixup! add namespaced tests
@coveralls
Copy link

coveralls commented Jul 1, 2016

Coverage Status

Coverage decreased (-5.5%) to 94.488% when pulling a56213d on elm-it-up into 7160651 on master.

@yoshuawuyts
Copy link
Owner Author

I think we're good - merging! ✨

@yoshuawuyts
Copy link
Owner Author

Oh PS this is a breaking change hah

@yoshuawuyts yoshuawuyts merged commit a5d02bf into master Jul 1, 2016
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