You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current approach to synchronize two carousels requires that the two carousels must be in the same context, where Hooper search for a carousel with ref prop same as the current carousel's synced prop value and link them together. This approach seemed to have many issues, especially when passing the carousels to another component slot (#69#55).
Suggested Solution
A new centralized event-bus to manage synced-carousels, which each carousel with synced prop subscribe to, and when one of the subscribed carousels is updated it notifies all the other carousels which have the same synced prop name.
I suggest we drop the propsynced as it implies boolean value, instead we could go for group name which is clearer. I thought about sync but it would be confusing since prop.sync modifier is a thing.
Motivation
The current approach to synchronize two carousels requires that the two carousels must be in the same context, where Hooper search for a carousel with
ref
prop same as the current carousel'ssynced
prop value and link them together. This approach seemed to have many issues, especially when passing the carousels to another component slot (#69 #55).Suggested Solution
A new centralized event-bus to manage synced-carousels, which each carousel with
synced
prop subscribe to, and when one of the subscribed carousels is updated it notifies all the other carousels which have the samesynced
prop name.Using Example
Benefits
Drawbacks
Deprecates the ref/synced API to link two carousels, instead, use
synced
prop for all carousels with the same value.Alternatives
N/A
The text was updated successfully, but these errors were encountered: