new to react. I am getting a JSON with this value
{
"unit": "G/ft²/yr"
}
I am setting it in a state variable and then using it to display in the title. I have done this in Django before and it converts it properly but I don't see that happening here so. am I sending the data wrong or is there a way to do this.
setUnit({
water_flow_unit: item.unit
});
<h4 className="baseline-graph-header">
Unit({Unit.unit})
</h4>
it displays as G/ft²/yr
but I want it converted.
Any help is appreciated.
Whole Building Water Flow ({waterUse.water_flow_unit})