bacon.react

v0.2.2
Embed Bacon streams into React Virtual DOM
lol-bal non-reactive

npm version

Get started

import React from "react"
import Bacon from "baconjs"
import Reify from "bacon.react"

Observe cardinality

// n = 1
<Reify>{Bacon.constant(<h1>LOL BAL</h1>)}</Reify>
=> <h1>LOL BAL</h1>

// n > 1
<Reify>{Bacon.constant("LOL")} {Bacon.constant("BAL")}</Reify>
=> <div>LOL BAL</div>

// n = 1
<Reify><h2>{Bacon.constant("LOL")} {Bacon.constant("BAL")}</h2></Reify>
=> <h2>LOL BAL</h2>

Optional lifecycle props

<Reify
  willMount={me => ...}
  didMount={myself => ...}
  willUnmount={i => ...}>
  ...
</Reify>

Longer examples

npm i bacon.react

Metadata

  • MIT
  • Whatever
  • Unknown
  • released 12/14/2015

Downloads

Maintainers