cycle-restart
cycle-restart copied to clipboard
Repeating when using cycle-restart?
Given the following code in an intent:
const assetUpdate$ = id$
.flatMapLatest(id => Observable
.merge(
DOM
.select('.title')
.events('input')
.map((e) => ({
id,
title: e.target.value,
}))
)
)
.do(() => console.log(1))
When using cycle-restart:
1: id$ is fired once 2: press key in ".title" field 3: "1" is printed once 2: id$ is fired 4 times 2: press key in ".title" field 3: "1" is printed 5 times
What's going on?
Re-subscribing to the same DOM element seem to duplicate stuff?