-
Notifications
You must be signed in to change notification settings - Fork 22
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
Fixed a code example and a spelling error #31
Conversation
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 - [ ] write code - [ ] write tests
@@ -241,7 +241,7 @@ app.model({ | |||
subscriptions: { | |||
emitWoofs: (send) => { | |||
// emit a woof every second | |||
setInterval(() => send('print', { woof: 'meow?' }), 1000) | |||
setInterval(() => send('print', { printWoofs: 'meow?' }), 1000) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this won't fly because line 248
expects a "woof"
property to exist on the object
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, changed the wrong thing! 😓 It should be setInterval(() => send('printWoofs', { woof: 'meow?' }), 1000)
The argument in send should match the effect name, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup, exactly! - I like the name "printwoofs"
Oooh, nice, thanks! :D |
Updated the code example again 😄 |
Whoops, totes forgot to merge this - fixed in 3b6ef39. Thanks heaps! ✨ |
Was reading through your barracks documentation and found two small errors.
Good work on choo and barracks by the way! 🙌