Skip to content

Latest commit

 

History

History
63 lines (51 loc) · 3.8 KB

0.9.0.md

File metadata and controls

63 lines (51 loc) · 3.8 KB

0.9.0 (commit log)

Breaking
  • On ReactComponentB, you now specify domType before lifecycle callbacks. This means that getDOMNode() will have the right type in lifecycle callback bodies.
  • Relaxed TopNode, (the greatest-upper-bound on component DOM node types), from HTMLElement to Element as React components can render SVG too.
  • TagMod composition is now associative: constituents are applied in the order they're composed in.
  • Renamed ComponentStateFocus to CompStateFocus.
  • Changed CompStateAccess shape and internals for improved type-inference and usage [35ec0b22].
    If you don't use this directly, you won't be affected.
Changes
  • Upgrade Scalaz from 7.1.1 to 7.1.2.
  • Tiny performance improvement composing EmptyTag.
New
  • Added EventListener. (live demo)
  • ReactComponentB now has .mixinJS method; components can now mixin pure-JS React mixins.
    Note: This doesn't mean JS mixins will work as expected, however. Some won't work correctly as they make assumptions that don't hold for Scala. If a mixin expects to inspect your props or state, forget about it; all your data is belong to Scala.
  • ReactComponentB now has a .reRender method for Scala mixins to customise a component's output.
  • More Scalaz IO support:
    • ReactComponentB now supports IO-aware lifecycle callbacks.
      Example: .componentWillUpdateIO instead of .componentWillUpdate.
    • SetInterval learned setIntervalIO.

Performance Management

A number of new tools and utilities have been introduced for you to manage the performance of your React app.

Detail with examples are here: PERFORMANCE.md.

  • Scala facade for React.addons.Perf. See https://facebook.github.io/react/docs/perf.html.
  • Reusability for fast, easy & safe shouldComponentUpdate management.
  • ReusableFn for stable callbacks that don't sabatage shouldComponentUpdate or go stale.
  • ReusableVal for specifying a value and its explicit reusability (in special/individual cases).
  • ReusableVar for safe R/W access to a variable, that works with shouldComponentUpdate.
    (Basically, ExternalVar + Reusability.)
  • Px for fast & effecient caching of graphs (data with dependencies).

Router v2

This release comes with a new and improved router.

The design of the v1 Router made certain features very hard to accommodate: #96, #103, #107, #100, #94, #69.

In contrast, the v2 Router has a different design that:

  • Uses a user-provided data representation of your pages to identify routes and their parameters.
  • Similarly the Router can now indicate the current page with precision, faciliating dynamic menus and breadcrumbs even in the presence of complex, dynamic routes.
  • Routes can be stateful and conditional.
  • Routes can be nested and modularised.
  • Routes can be manipulated in bulk.
  • Has a better API such that usage previously recommended against, is now impossible. Noteworthy is that Router is now just a ReactComponent, and RouterCtl is the client API.

Detail with examples are here: ROUTER2.md.