I have object with property which should be destructred. But if it has false value I want to fetch it from backend.
const { property = await someMethodThatSendsRequest() } = myObject;
But this is not working. The question is - Is this even possible ?
Just use a variable as a default value:
const defaultProperty = myObject.property || await someMethodSendsRequest();
const { property = defaultProperty } = myObject;