So I have been working on the implementation of breadcrumbs feature in my sveltekit webapp.
Would be nice if someone can share their experiences if they encountered something similar like this.
This could probably be approach similarly to passing snippets to a parent layout:
By setting an object in a context that descendants can write to.
The pages then do not render content directly but set the breadcrumb data and their content (in form of a snippet) in this context. The parent layout renders children
first to get the data, then renders the content from the context/the breadcrumbs.
Example relating to snippets can be found in this answer.
This is a bit if a hack, so not ideal. Some of this logic could also be extracted to components but that is probably only marginally better.