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

Replaces addChildView with non-existent onChildAdd #40

Open
tkalliom opened this issue Mar 7, 2022 · 2 comments
Open

Replaces addChildView with non-existent onChildAdd #40

tkalliom opened this issue Mar 7, 2022 · 2 comments

Comments

@tkalliom
Copy link

tkalliom commented Mar 7, 2022

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 marionettejs/backbone.marionette@1af07ba and marionettejs/backbone.marionette@78e55ff I guess that onChildAdd was an intermediate naming which never made it to a release version?

@paulfalgout
Copy link
Member

paulfalgout commented Mar 7, 2022

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

@paulfalgout
Copy link
Member

Yep it should be changed to addChild https://github.com/marionettejs/backbone.marionette/blob/v2.0.0/src/marionette.collectionview.js#L248

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

No branches or pull requests

2 participants