I'm trying to understand returning info from APEX in the lwc and showing it in the html. I'm calling the APEX, but the HTML continues to return "[object Object]"
Can you see anything wrong with my code?
.js...
import { LightningElement, api, wire } from 'lwc';
import acceptRtnSomthing from '@salesforce/apex/HelperAccount.acceptRtnSomthing';
export default class UltimateParentMRR extends LightningElement {
@api recordId;
somethingReturned = "Value in .js....";
@wire(acceptRtnSomthing, {recId : '$recordId' })
somethingReturned;
}
HTML...
<template>
<lightning-card title="Ultimate Parent MRR" icon-name="standard:account">
<div class="slds-m-around_medium">
{somethingReturned}
</div>
</lightning-card>
</template>
APEX...
@AuraEnabled (cacheable=true)
public static string acceptRtnSomthing(string recId){
return recId;
}
Again - output in the HTML is just ... [object Object]
If I comment out the call to the APEX - the HTML output is Value in .js....