Skip to content

Releases: pfgray/chainable-components

v1.7.0

02 Apr 14:17
Compare
Choose a tag to compare
v1.7.0 Pre-release
Pre-release

Changes:

  1. Added fp-ts Monad typeclass for chainable components:
import { chainableComponent } from 'chainable-components/dist/lib/fpts'
  1. Added DoBuilder export which binds the generalized Do from fp-ts-contrib to chainable componentsL
import { DoBuilder } from 'chainable-components/dist/lib/fpts'

DoBuilder
  .bind('outer', withState(0))
  .bindL('inner', ({outer}) => withState(10))
  .done()
  .render(({inner, outer}) => (
    <div>...</div>
  ))
  1. Added ChainableComponent.allT() which uses improved mapped type support for a simpler version of all without losing inference:
ChainableComponent.allT(
  withState('string value'),
  withState(1),
).render(([str, num]) => (
  <div></div>
))
  1. Improved type inference for fromRenderProp and fromNonStandardRenderProp.

v1.5.2

12 Oct 01:18
Compare
Choose a tag to compare
v1.5.2 Pre-release
Pre-release

Adds DoRender, which is like Do, but automatically renders your Chainable chain:

ChainableComponent.DoRender(
  withState(5),
  () => withState(5),
  () => withState('foo'),
  (foo, inner, outer) =>
    <div>
      {foo.value}
      <div>outer: {outer.value}</div>
      <button onClick={() => outer.update(outer.value + 1)}>+</button>

      <div>inner: {inner.value}</div>
      <button onClick={() => inner.update(inner.value + 1)}>+</button>
    </div>
)

v1.5.1

15 Sep 17:35
Compare
Choose a tag to compare
v1.5.1 Pre-release
Pre-release

Bugfix:

  1. Added fantasy-land/* methods in addition to the fantasyland/* methods to the Chainable Components type. fantasyland/* methods still exist, but are deprecated.

v1.5.0

19 Aug 22:15
Compare
Choose a tag to compare
v1.5.0 Pre-release
Pre-release
v1.5.0

v1.3.0

23 Jun 17:37
Compare
Choose a tag to compare
v1.3.0 Pre-release
Pre-release
  1. Renamed ap -> render
  2. Implemented ap as the ap from fantasy-land