Skip to content

v1.7.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@pfgray pfgray released this 02 Apr 14:17
· 2 commits to master since this 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.