Suppose I am having something like:
In my lwc code, and I am reading the data from apex controller using something like:
import getOrderLines from '@salesforce/apex/Controller_OrderLinesUI.getOrderLines';
Not a wired method.
I will be getting order is undefined error. That's because order is null before the data is loaded from the apex controller.
The previous walkaround we are using is to put the div code inside a if:true template like:
This approach is working but a bit awkward to me. Is this the suggested way of doing this or is there a more elegant way?