I m trying to create a stream from an array logging inside of its map operator but it seems that something goes wrong in my code and I can't point it out...
import {Slider} from './slider/slider'
import xs from 'xstream'
export function App(sources) {
const props = {
marbles$: xs.fromArray([{
color: 'red',
x: 0
}, {
color: 'blue',
x: 20
}])
}
props.marbles$.map(item => {
console.log(item) // nothing displayed on here
return item
})
return Slider(Object.assign(sources, {props}))
}
On this little code, I m simply creating a props object containing a marbles$ stream from an array.
Just below I try to log on each item in the stream but nothing happens, and I don't understand why.
Plunker here : https://plnkr.co/edit/6uMsLIl1Edd5x670OqHa?p=preview
Nothing to show on the HTML file, only on the JS file
Any idea ?