0.5.0 (commit log)
- Added
Simulation
for composition and abstraction ofReactTestUtils.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 JSwindow.setInterval
but automatically callsclearInterval
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.
- Bugfix for tag attributes with primitive values.
Eg.
input(tpe := "checkbox", checked := false)
works now. ScalazReact
's~~>
andrunState
functions are now lazy.- Upgrade Scalatags to 0.4.2. Fixes sourcemap warnings.
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 toReactComponentU
andReactComponentM
.- Just as umounted Scala and JS components are denoted by
ReactComponentU
andReactComponentU_
respectively, mounted Scala and JS components are now denoted byReactComponentM
andReactComponentM_
. - Type changes.
ReactComponentB
innards reworked. UseReactComponentB[P,S,B]
in place ofReactComponentB[P]#B2[S]#B3[B]#B4[C]
.CompCtor
→ReactComponentC
CompCtorP
→ReactComponentC.ReqProps
CompCtorOP
→ReactComponentC.DefaultProps
CompCtorNP
→ReactComponentC.ConstProps
ReactComponentM
→ReactComponentM_
ComponentConstructor_
→ReactComponentC_
ComponentConstructor
→ReactComponentCU
- The following have been renamed, the old names deprecated:
ReactComponentB.create
→build
ReactComponentB.createU
→buildU
ReactComponentB.propsAlways
→propsConst
Nop
→EmptyTag