Say I have:
{#await showMinePromise}
<p>...Loading</p>
{:then entries}
// do stuff
{/await}
Is there a way to update the entries variable to add in items (as when the user adds something, etc)? By that I mean manually insert an item into the array external to the await -- no call to update the promise.
You can do that :
<script>
let fetchSomething = ... // some Promise
let datas;
fetchSomething.then(r => datas = r);
</script>
{#await fetchSomething}
<p>Loading</p>
{:then}
// use datas. it's updatable
{/await}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With