Comment

Comment by devrelm

It looks like Subscribe's `to` prop expects an array. So, `[CounterContainer]` is just an array with a CounterContainer in it.

The `{ }` that wrap it are just part of the syntax of passing props. If you wanted to pass an object literal to a prop, you'd have to double-up the curly braces:

  <div style={{ color: 'white' }} />
And strings can be passed with or without curly braces:

  // both of these are fine:
  <div id='foo' />
  <div id={'foo'} />
parent devrelm 8 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton