You can use a JS module (pubsub) that follows the publish-subscribe pattern to communicate between components that aren’t in the same DOM tree. In the publish-subscribe pattern, an event publishes the event and other components subscribe to it.
⏱️ 4 minutes read
#JavaScript
Post #950
7.08K