<script>
import { Pages } from '/imports/api/collections/pages'
import track from '/imports/utils/useTracker'
export let slug = ''
let page
let isReady
track(function () {
isReady = Meteor.subscribe('page', slug).ready()
})
track(function () {
page = Pages.findOne({ slug })
})
</script>
{#if !isReady}
<div>Loading</div>
{/if}
{#if page}
<div>{@html page.content}</div>
{/if}
This PR does apply the props differently from a previous patch on the slotted code path. That applies ALL $$props to the child component, including the loader and other Loadable config. This PR avoids that for non-slotted children. I wonder whether the slotted behavior should also only pass the leftover componentProps instead of passing everything?
It would also be nice if the two used the same signature, but it's not allowed to spread onto a slot...
This PR attaches additional properties to the loaded component when not using a named slot. This allows patterns like this:
This PR does apply the props differently from a previous patch on the slotted code path. That applies ALL $$props to the child component, including the loader and other Loadable config. This PR avoids that for non-slotted children. I wonder whether the slotted behavior should also only pass the leftover
componentProps
instead of passing everything?It would also be nice if the two used the same signature, but it's not allowed to spread onto a slot...