React JS Hook Serialport Communication

Dear All,
I have a digital weighting machine attached to local pc and a web application designed in react js hooks.
When i send a command “W” to the serialport
Weight Machine sends data to serialport and i have to display result in a textbox designed in react js

any help please