Because props are passed down to CompareStep components, which may be undefined when the child component is mounted, we have to somehow handle this. This is purely a timing issue. I'm using something like
doesn't seem like the best way to handle this. There are too many options, I don't know what is best, besides I haven't managed to make all of them work e.g.async (in combination with Suspense, which is currently still an experimental feature), async components, etc. Maybe something like <child-component @vnodeMounted="doSomething" /> would work? There are many resources, but none is definitely useful... check also Better support for top-level await in . This might be the best solution: useAsyncState from VueUse.
A clear and concise description of todo items.
Re async, check how axios does it e.g.
// Want to use async/await? Add the `async` keyword to your outer function/method.
async function getUser() {
try {
const response = await axios.get('/user?ID=12345');
console.log(response);
} catch (error) {
console.error(error);
}
}
Aims/objectives.
Because props are passed down to CompareStep components, which may be undefined when the child component is mounted, we have to somehow handle this. This is purely a timing issue. I'm using something like
doesn't seem like the best way to handle this. There are too many options, I don't know what is best, besides I haven't managed to make all of them work e.g. async (in combination with
Suspense
, which is currently still an experimental feature), async components, etc. Maybe something like<child-component @vnodeMounted="doSomething" />
would work? There are many resources, but none is definitely useful... check also Better support for top-level await in . This might be the best solution: useAsyncState from VueUse.A clear and concise description of todo items.
Re
async
, check how axios does it e.g.