Skip to content

Error when using xs.of instead of Observale.of #37

@abouzoubaa

Description

@abouzoubaa

@Widdershin

TypeError: xstream_1.default.fromObservable(sinks[name]).subscribe is not a function.

The code in main.js:

import { run } from '@cycle/run';
import { makeCanvasDriver, rect, text } from 'cycle-canvas';
import xs, { stream } from 'xstream';

function main(sources) {
const obj = {
Canvas: xs.of(
rect({
x: 10, y: 10, width: 160, height: 100,
draw: [{ fill: 'purple' }],
children: [
text({x: 15, y: 25, value: 'Hello World!', font: '18pt Arial', draw: [{ fill: 'white' }]})
]
})
)
};
return obj
}
const drivers = {
Canvas: makeCanvasDriver(null, { width: 800, height: 600 })
};
run(main, drivers);

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions