Don't render the active client app screen until the router is loaded to avoid a wasted render

This commit is contained in:
Andrew Kingston 2022-01-25 11:21:42 +00:00
parent d5ef915f39
commit 57aa63a2d6
1 changed files with 7 additions and 5 deletions

View File

@ -20,8 +20,10 @@
</script>
<!-- Ensure to fully remount when screen changes -->
{#key screenDefinition?._id}
<Provider key="url" data={params}>
<Component isScreen instance={screenDefinition} />
</Provider>
{/key}
{#if $routeStore.routerLoaded}
{#key screenDefinition?._id}
<Provider key="url" data={params}>
<Component isScreen instance={screenDefinition} />
</Provider>
{/key}
{/if}