Replies: 1 comment 2 replies
-
|
I created a fork with the solution https://codesandbox.io/s/little-leaf-44o2c3?file=/src/index.ts The issue was that the observable is still a function and to get the contents aka the object with foo, baz it still needs to be expanded manually. If these were single observables each with a primitive the template wouldn't need to expand them like that because Sinuous knows how to expand observables in a template automatically. aka const foo = o<string | undefined>(undefined);
const baz = o<number | undefined>(undefined);
return html` <div>Data baz: ${baz}</div> `; |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
First 30 minutes of trying Sinuous. I need a component that takes an object and displays a property. I'm able to use an observable directly, but I'm struggling to pass the underlying data to the component. The intention here is to have a reusable to which I can pass data from an arbitrary source. Can anyone point me in the right direction? Thanks!
CodeSandbox
Beta Was this translation helpful? Give feedback.
All reactions