Question: How to send data with no NUI callback
Rasinzz opened this issue · comments
Rasinzz commented
I made a vehicle hud that displays speed, gear and rpm when inside a vehicle. It doesn't have any buttons to click, so it doesn't use the native RegisterNUICallback
at all. I was wondering how I can send data (such as speed, gear, etc.) back to React from the client-sided Lua code?
Echo commented
Client: SendReactMesssage("speed", speed)
UI: useNuiEvent("speed",(speed) => {setSpeed(speed})