subscriptions: object or array?
See original GitHub issueI’m noticing in the choo docs subscriptions is referred to as an array:
subscriptions: [
(send, done) => {
setInterval(() => {
send('app:print', { payload: 'dog?', myOtherValue: 1000 }, (err) => {
if (err) return done(err)
})
}, 1000)
}
]
But in the barracks docs it’s a plain object with named keys:
subscriptions: {
emitWoofs: (send, done) => {
// emit a woof every second
setInterval(() => send('printWoofs', { woof: 'meow?' }, done), 1000)
}
}
I’ve seen it referred to both ways – so which should it be?
Bonus question: if subscriptions is an object, do key names have any bearing on other aspects (reducers, effects, actions)?
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Angular subscribe push object to array - Stack Overflow
subscribe(response => this.users = response.data); // This will directly store your response data in an array of objects.
Read more >Array - JavaScript - MDN Web Docs
The Array object, as with arrays in other programming languages, enables storing a collection of multiple items under a single variable name ...
Read more >The subscription item object - Stripe API reference
Describes how to compute the price per period. Either per_unit or tiered . per_unit indicates that the fixed amount (specified in unit_amount or ......
Read more >Array of Objects - Braze
This reference article covers using an array of objects as a data type for custom attributes, including limitations and usage examples.
Read more >Subscription - RxJS
A Subscription is an object that represents a disposable resource, usually the execution of an Observable. A Subscription has one important method, unsubscribe ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
lol, javascript
It should be an object (:
On Sun, Jan 15, 2017 at 12:09 AM Haroen Viaene notifications@github.com wrote: