Marionette.Upgrade
Marionette.Upgrade copied to clipboard
Replaces addChildView with non-existent onChildAdd
The upgrade script replaces addChildView
with onChildAdd
, which does not exist in v2. It seems to me that the v2 equivalent of addChildView
is _onCollectionAdd
.
Looking at https://github.com/marionettejs/backbone.marionette/commit/1af07bafe9e3a87fe467f8f65f50edf656776deb and https://github.com/marionettejs/backbone.marionette/commit/78e55ff1f053ad942a3e7d5a20db54c979b6270a I guess that onChildAdd
was an intermediate naming which never made it to a release version?
~~Well it looks like _onCollectionAdd
is a v4 add.~~ Really I think this library despite the readme's mention of "latest version" is only handling v1->v2 updates.
If I remember correctly v2->v3 had https://github.com/marionettejs/marionette-v3-compat which was a monkey patch that console logged where updates needed to be made. Then the v4 upgrade.. I believe is just documented.. mostly because breaking changes involved mostly just pulling out certain things to other libraries.
Edit: Nope. I missed where the edit was.. one sec
Yep it should be changed to addChild
https://github.com/marionettejs/backbone.marionette/blob/v2.0.0/src/marionette.collectionview.js#L248