Skip to content

[Feature] Support passing of svelte stores to debugbar data prop #1

@lnfel

Description

@lnfel

Right now if you want to pass svelte store data to LamyDebugbar users are required to do it like the following:

<script>
  import { writable } from 'svelte/store'
  import LamyDebugbar from 'lamy-debugbar'
  
  export let data: PageData
  
  const someStore = writable()
  
  $: debug = {
    someStore: $someStore
    data
  }
</script>

<LamyDebugbar data={debug} />

While it is fine for most cases, especially when we are combining multiple sources of data to be displayed by LamyDebugbar. This does not make sense when we only need to pass a single store data.

Note that users can pass store data using the reactive store syntax (i.e. $storeName). This proposal aims to support passing store instances as data prop.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions