Replies: 1 comment 1 reply
-
|
Outlets would be helpful here. https://stimulus.hotwired.dev/reference/outlets Update: If you need event communication from parent to child, bubbling is propably wrong strategy - bubbled event goes from child to parent and ends on window. Capture works in other direction, from window(parent ) to child. In Stim docs i see there is :capture flag for actions, maybe try that: https://stimulus.hotwired.dev/reference/actions |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
How garage controller can call
drive()function from car controller where car id = 2.garage_controller.jscar_controller.jsI've seen the
getControllerForElementAndIdentifierfunction but the doc implies that we should only use it as a in last resort.So how de we do it with an event? I've tried to dispatch bubbling events from the
garage controller, but thecar controllerdoesn't intercept them.garage_controller.jscar_controller.jsBeta Was this translation helpful? Give feedback.
All reactions