0

With cycle.js I am trying to create a reusable component that can exist multiple times of the page, including event handlers.

When using DOMSource.select it seems to be matching on the entire app container. Is there a way I can .select from only my (this instance of the component's) sub elements?

  • This sort of question might be better suited for https://gitter.im/cyclejs/cyclejs Here people expect to see what code you've tried. – bloodyKnuckles Nov 01 '16 at 17:28

2 Answers2

0

The answer was to use isolate(). It's somewhat similar to every Iterable item in react needing a key attribute.

0

If you have a single component or just a few, isolate() mentioned by tm1rbrt works well and is simple to use.

If you have a large list of objects to render as components, especially if you have to update that list, try out cycle.js collections: https://github.com/cyclejs/collection

Brian C.
  • 6,455
  • 3
  • 32
  • 42