Skip to content

Latest commit

 

History

History
47 lines (35 loc) · 2.28 KB

1.0.1.md

File metadata and controls

47 lines (35 loc) · 2.28 KB

v1.0.1

Usually the first release after a v1.0 fixes a bunch of bugs and starts promoting confidence in stability. I'm very happy to report that scalajs-react v1.0 was rock solid and as of yet, no bugfixes have been necessary! This majority of changes in this release are API convenience.

  • Use new Scala.JS 0.6.17 annotations so that React facades JustWork when compiling to modules. WebpackRequire is no longer required and thus deprecated. You can also remove expose-loader from your scalajs-bundler config.

  • Add to Option[Callback]: .getOrEmpty which is a convenience for writing .getOrElse(Callback.empty)

  • Add when/unless to object TagMod. Unlike <tagmod>.when(Boolean) this can avoid creating vdom only to throw it away. …Which sounds great but in nearly all cases it's not going to matter; in most usages this will save less than 100ns, where as unless you're doing custom animations you've got approx 80,000,000ns to complete a render cycle in order to appear instantaneous to users. Unless you've got a huge monolithic component, or need to perform significant processing, don't feel obliged to rewrite all of your when/unless clauses. Better to see PERFORMANCE.md for more effective solutions to improve performance.

  • Add Reusability#reusable(A) as a flipped alternative of Reusable.explicitly(A)(Reusability) that avoids annoying Scala type inference problems in certain situations.

  • Deprecate

    • WebpackRequire as mentioned above
    • ReactAddons.CSSTransitionGroup which has been deprecated by React (see)
    • CallbackOption: .get.void.toCallback
    • CallbackOption: .get.asCallback
    • CallbackOption: .toBoolCB.asCallback.map(_.isDefined)
  • Add helpers to SimEvent.Keyboard that sync keyCodes and keyValues. Examples:

      def F1   = SimEvent.Keyboard(key = KeyValue.F1       , keyCode = KeyCode.F1)
      def Down = SimEvent.Keyboard(key = KeyValue.ArrowDown, keyCode = KeyCode.Down)
      def A    = SimEvent.Keyboard(key = "A"               , keyCode = KeyCode.A)
      def a    = SimEvent.Keyboard(key = "a"               , keyCode = KeyCode.A)
  • Upgrade

    • Scala.JS to 0.6.17
    • Scalaz to 7.2.13
    • scalajs-dom to 0.9.2