Skip to content

Latest commit

 

History

History
39 lines (35 loc) · 2.55 KB

0.5.0.md

File metadata and controls

39 lines (35 loc) · 2.55 KB

0.5.0 (commit log)

New features
  • Added Simulation for composition and abstraction of ReactTestUtils.Simulate procedures.
  • Added Sel for easy DOM lookup in tests. Eg. Sel(".inner a.active.new") findIn myComponent.
  • Experimental Scala-based component mixins. Three mixins are included. See examples.
    • OnUnmount - Automatically run stuff when the component unmounts.
    • SetInterval - Same as JS window.setInterval but automatically calls clearInterval on unmount.
    • Listenable - A component is able to receive external data. Automatically registers to receive data on mount, and unregisters to stop on unmount.
  • Added ScalazReact.ReactS.liftR of type (S ⇒ ReactST[M,S,A]) ⇒ ReactST[M,S,A].
  • New method ReactComponentB.domType now allows you to specify the type returned by .getDOMNode() on your component.
Fixes & improvements
  • Bugfix for tag attributes with primitive values. Eg. input(tpe := "checkbox", checked := false) works now.
  • ScalazReact's ~~> and runState functions are now lazy.
  • Upgrade Scalatags to 0.4.2. Fixes sourcemap warnings.
API changes

Most people will be unaffected by this. Numerous changes were made to internal types making them more consistent (see TYPES.md).

  • ReactComponentB accepts an optional DOM node type, which is propagated to ReactComponentU and ReactComponentM.
  • Just as umounted Scala and JS components are denoted by ReactComponentU and ReactComponentU_ respectively, mounted Scala and JS components are now denoted by ReactComponentM and ReactComponentM_.
  • Type changes.
    • ReactComponentB innards reworked. Use ReactComponentB[P,S,B] in place of ReactComponentB[P]#B2[S]#B3[B]#B4[C].
    • CompCtorReactComponentC
    • CompCtorPReactComponentC.ReqProps
    • CompCtorOPReactComponentC.DefaultProps
    • CompCtorNPReactComponentC.ConstProps
    • ReactComponentMReactComponentM_
    • ComponentConstructor_ReactComponentC_
    • ComponentConstructorReactComponentCU
Deprecated
  • The following have been renamed, the old names deprecated:
    • ReactComponentB.createbuild
    • ReactComponentB.createUbuildU
    • ReactComponentB.propsAlwayspropsConst
    • NopEmptyTag