Send & Receive Messages
Components are isolated from each other and scenes, meaning triggers and responses within a component cannot be assigned to layers and variables outside of it. The same applies to triggers and responses in a scene or nested component, which cannot be assigned to layers and variables within a component.
To overcome this limitation, you can utilize the Send response and Receive trigger. Within the component, you can send a message using the Send response, and it can be received by a Receive trigger located outside of this specific component (in a scene, parent component, or child component). This communication can also work in reverse.
Of course, it is also possible to send and receive messages exclusively within the component itself.
Send Responses
Send to Parent
This channel allows you to send a message from the component to a parent component or scene when there's no parent component.
![[object Object]](https://cdn.sanity.io/images/vidqzkll/production/2115a41c89e2b9d4e7a29739062edba2848568d5-2175x1200.png/Send-to-Parent.png)
Send to Child Component
This channel allows you to send a message from the component to a child component.
![[object Object]](https://cdn.sanity.io/images/vidqzkll/production/0eec885431440cbf23736ecde89f75c276a938e3-2175x1200.png/Send-to-Child-Component.png)
Send to Current Scene
This channel allows you to send a message from the component to the scene where the component is used.
![[object Object]](https://cdn.sanity.io/images/vidqzkll/production/29bf4b4ae2cf770c87248cbe5a92dcae11e4fe53-2175x1200.png/Send-to-Current-Scene.png)
Send to Current Component
This channel allows you to send a message that remains within the component.
![[object Object]](https://cdn.sanity.io/images/vidqzkll/production/aafe04eef672d1c020e8bfb65b5c347c143aa651-2175x1200.png/Send-to-Current-Component.png)
Receive Triggers
Receive from Parent
This channel allows you to receive messages from a parent component or scene when there's no parent component.
![[object Object]](https://cdn.sanity.io/images/vidqzkll/production/48657f12f0e5a3caefc283d94f2d15dcdc5af253-2175x1155.png/Receive-from-Parent.png)
Receive from Child Component
This channel allows you to receive messages from a child component.
![[object Object]](https://cdn.sanity.io/images/vidqzkll/production/bb7529808cdae398a4ee050bb71dfa1c08e1a545-2175x1155.png/Receive-from-child-component.png)
Receive from Current Scene
This channel allows you to receive a message from the scene where the component is used.
![[object Object]](https://cdn.sanity.io/images/vidqzkll/production/b3d3a91648ab9732fd13c18f4c238783f6f220ca-2175x1155.png/Receive-from-current-scene.png)
Receive from Current Component
This channel allows you to receive a message that remains within the component.
![[object Object]](https://cdn.sanity.io/images/vidqzkll/production/993800e909c584c80f2319d5a7d1c6ed89a56d9f-2175x1155.png/Receive-from-current-component.png)
If you want to explore more deeply how the Send and Receive feature can be used, we highly recommend joining the ProtoPie Masterclass.
The masterclass offers an in-depth exploration of the feature and provides you with the knowledge and skills to use it effectively. Don't miss out on this opportunity to take your Protopie skills to the next level!