Skip to content

Latest commit

 

History

History
38 lines (33 loc) · 1.98 KB

0.9.2.md

File metadata and controls

38 lines (33 loc) · 1.98 KB

0.9.2 (commit log)

New
  • Support for JS components. See USAGE.md for details.
  • Add ReactComponentB.initialStateC which provides access to the component (albeit without the Backend type set).
    An interesting application is self-managing state, a minimalistic example of which you can read in SelfManagedStateTest.scala. Note that self-managed state cannot be initialised with vals in a Backend, a significant limitation.
  • Add onError attribute for use with <img>.
  • Add ReusableVar.toExternalVar.
Changed
  • Added Reusability.caseClass[A] macro and deprecated Reusability.caseclassN(A.unapply).
    Also comes with caseClassDebug[A] which shows you the code it generates.
  • In the Router2 route-building DSL, added caseClass[A] and deprecated caseclassN(A)(A.unapply).
    Also comes with caseClassDebug[A] which shows you the code it generates.
  • Facades React and ReactTestUtils are now also traits.
  • On ComponentScopes, deprecated and renamed:
    • focusState to zoom.
    • focusStateL to zoomL.
    • focusStateId to lift.
  • Test simulation data objects {Change,Keyboard,Mouse}EventData no longer wrap args in UndefOr with undefined as the default, because it crashes PhantomJS. All args have default values now.

Migration commands: (run them in order) ```sh # Reusability.caseClass find . -name '*.scala' -type f -exec perl -pi -e 's/Reusability\.caseclass\d+\s*\(\s*(\S+)\s*\.\s*unapply\s*\)/Reusability.caseClass[$1]/' {} +

DSL route.caseClass

find . -name '.scala' -type f -exec perl -pi -e 's/.caseclass\d+\s(\s*(\S+)\s*)\s*([^)]+.\sunapply\s)/.caseClass[$1]/' {} +

focusState

find . -name '.scala' -type f -exec perl -pi -e 's/focusStateId/lift/g' {} + find . -name '.scala' -type f -exec perl -pi -e 's/focusState/zoom/g' {} +