Closed dschissler closed 9 years ago
It's pretty similar to Backbone.Events and so should support the same methods.
Have you tried it?
No but I'm near to doing it. It will take me some hours to convert my Marionette R&D skeleton to Ampersand (to port some old pure Backbone code). I'm considering just using Events.createEmitter()
since I don't think that I need multiple channels.
@dschissler did you ever use Radio with ampersand?
No. I might try that soon since my code has settled down a bit since all of the structure is ampersand now. I'll let you know about that.
@dschissler That would be great. I really like Backbone Radio and so being able to utilise with Ampersand would be a big win.
@getdave Sorry for the long delay. The backend took a long time. So far it seems to be wiring up well with:
backbone_shim
user module
'use strict';
import Events from 'ampersand-events';
export default {
Events: Events
}
webpack config
alias: {
underscore: 'lodash',
backbone: 'backbone_shim',
...
},
globalCh
user module
'use strict';
import Radio from 'backbone.radio';
export default Radio.channel('global');
I think that its best to use a globalCh module because you can wire it up with different libraries.
I'm considering using all Ampersand modules and creating a fake
backbone
module with the following so that I can usebackbone.radio
.Will this work?