UReactBridgeReceiverComponent
Source: SampleProject/Plugins/UnrealReactBridge/Source/UnrealReactBridge/Public/ReactBridgeReceiverComponent.h
UActorComponent that listens for events sent from React (window.ue.bridge.send(EventName, payload)) and surfaces them to Blueprint via a multicast delegate. Drop it on any Actor that wants to react to UI input.
- UCLASS:
ClassGroup = ("Web HUD"),BlueprintSpawnableComponent - Display name: React Bridge Receiver
- Add via: Components panel → Add → search "React Bridge Receiver"
- Auto-registers with
UUnrealReactBridgeSubsysteminBeginPlay, unregisters inEndPlay.
Properties
| Property | Type | Category | Notes |
|---|---|---|---|
EventName | FString (EditAnywhere, BlueprintReadWrite) | React Bridge | The event name to subscribe to. Case-sensitive. Must match the React-side window.ue.bridge.send(EventName, ...) argument exactly. |
Delegates
| Delegate | Type | Category | When |
|---|---|---|---|
OnReceived | FOnReactBridgeEvent (BlueprintAssignable) | React Bridge | Fires with (JsonData : String) when a matching React-side send arrives |
FOnReactBridgeEvent
cpp
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnReactBridgeEvent, const FString&, JsonData);JsonData is the raw JSON string from event.detail. Parse it with JsonUtilities on the C++ side or with the BP utility nodes in /guide/receive-events.
Notes
- No per-source filter in v1. The component fires for matches from any registered HUD layer. If two HUDs send the same
EventName, both will trigger the delegate. - Stale components are skipped. The subsystem holds receivers as
TWeakObjectPtrand skips destroyed entries during dispatch — you don't need to manually unbind inEndPlay. - No delivery ordering guarantees across receivers. Multiple receivers subscribed to the same
EventNamefire in registration order on the same frame; do not rely on a specific order across actors.
Example
text
ReactBridgeReceiver (component)
EventName: "ui:reload:click"
Event On Received (JsonData : String)
└─ Print String "got reload: " + JsonDatacpp
// C++ equivalent
Receiver->EventName = TEXT("ui:reload:click");
Receiver->OnReceived.AddDynamic(this, &AMyActor::HandleReload);
void AMyActor::HandleReload(const FString& JsonData)
{
UE_LOG(LogTemp, Log, TEXT("got reload: %s"), *JsonData);
}TIP
For event names, the project convention is lowercase colon-separated namespacing (e.g. ui:reload:click, player:inventory:pick). React and UE both treat the string opaquely — pick a convention and stick to it.
See also
/guide/receive-events— patterns and JSON parsing tips/reference/bp-sender— the reverse direction (UE → React)/reference/bridge-protocol— wire-level details