Talking between 2 components...
That is request something and do something with the response...
What are my options?
option #1:
component1 -> trigger('askForAnId')
component2 -> on('askForAnId', getId)
component2 -> trigger('replyWithId')
component1 -> on('replywithId')
A bit ugly, but it doesn't work out of component3,4,5,etc. want to also 'askForAnId' unless i have all components listen on 'replywithId' and set a key on the payload to filter who it's actually for
option #2:
send a 'callback' function along with the payload to be run, seems the most reasonable
What do you guys do?