Does Bacon have an equivalent to Kefir’s Property (a stream that remembers its last value)?
Brenton Simpson

Hi Brenton,

And thanks for the feedback! Bacon.js doesn’t have any way to get values outside from the stream without subscription. And in my opinion that is a good thing because it’d violate the core ideas of FRP.

I’d implement that kind of “adhoc fetching” with .plug, somehow like this:

const products = Bacon.update(initialProductsById,
['fetched')], (products, p) => {
return R.merge(products, R.createMapEntry(, p))
['selected')], (products, id) => {
if (!products[id]) {
d.plug('fetched', Bacon.fromPromise($.getJSON('/products/' + id)))
return products

const selectedProduct = Bacon
.combineTemplate({products, id:'selected')})
.map(({products, id}) => products[id] || 'Fetching..')

Great post though! Nice list of advantages and reasonable rationale behind them. I’m also going to make an article with a concrete examples how to create isomorphic apps with React+FRP. Maybe releasing it in the next weekend.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.