Skip to content

Latest commit

 

History

History
91 lines (80 loc) · 3.58 KB

1.0.0-RC.md

File metadata and controls

91 lines (80 loc) · 3.58 KB

1.0.0-RC1

See https://github.com/japgolly/scalajs-react/blob/v1.0.0-RC1/doc/changelog/1.0.0.md

1.0.0-RC2

  • Rename ScalaComponent.build{ ⇒ er}
  • Curry ScalaComponent.{,builder.}static
  • Mounted components' isMounted result is now Option[Boolean] as it isn't available on all components.
  • ES6 component classes:
    • Add raw facade
    • Test that Scala.JS defined classes work
    • Test that JsComponent works with ES6 classes
    • Allow JsComponent#withRawType to expose the raw ES6 class
  • Add WebpackRequire objects for webpack/scalajs-bundler users
  • Replace all overloaded Js{,Fn}Component .apply methods with .apply(js.Any) which expects a raw value.
  • Provide useful debug info when a Js{,Fn}Component is constructed with an invalid value.
  • There's now a Cats module, analogous to the Scalaz module.

Migration:

  1. Run:
    find . -name '*.scala' -type f -exec perl -pi -e '
      s/(ScalaComponent\s*\.\s*build)(\s*\[)/\1er\2/g;
      s/(ScalaComponent\s*\.\s*static\s*\(\s*".*?")\s*, */\1)(/;
    ' {} +
  2. No more Js{,Fn}Component.apply(String). Instead of
    val Blah = JsComponent[JsProps, Children.None, JsState]("Blah")
    use one of these instead:
    @JSName("Blah")                // If you're not using modules
    @JSImport("./blah.js", "Blah") // If you're using modules
    @js.native
    object BlahJs extends js.Object
    
    val Blah = JsComponent[JsProps, Children.None, JsState](BlahJs)
    or
    val Blah = JsComponent[JsProps, Children.None, JsState](js.Dynamic.global.Blah)

1.0.0-RC3

  • In router DSL, add an overload of addCondition that accepts Page => CallbackTo[Boolean].
  • In router DSL, support up to 22 params (was previously 8 due to laziness).
  • Add more ScalaDoc to Callback#runNow that should hopefully clarify its intended usage.
  • Make RenderScope a value class.
  • Scala component builder changes:
    • .build now creates ES6 classes that extend React.Component. If for whatever reason you want to keep using React.createClass (which has been formally deprecated), then call .buildWithReactCreateClass.
    • Renamed and simplified initial-state functions. If you are using .getInitialState (doubtful anyone is), use one of the .initialState… methods. The migration script below will take care of the rest.
    • Add more ScalaDoc.
    • Internal reorganisation.
  • Add Px#toCallback.
  • In Callback{,To,Option} rename traverse{O ⇒ Option} and sequence{O ⇒ Option}.
  • Add CallbackTo.liftTraverse that takes a A => CallbackTo[B] and given...
    • .std[T[_]] returns a CallbackTo[T[A] => T[B]] for any stdlib-traversable T.
    • .option returns a CallbackTo[Option[A] => Option[B]].
    • .id returns a CallbackTo[A => B].
  • Add Reusable.ap(ra: Reusable[A], rb: Reusable[B])(f: (A, B) => C): Reusable[C]
  • Add Reusable[A]#ap[B](rf: Reusable[A => B]): Reusable[B]
  • Add Reusable[A]#tuple[B](rb: Reusable[B]): Reusable[(A, B)]
  • Upgrade to React to 15.5.4.
  • Upgrade to Scala.JS 0.6.15.
  • Upgrade to Scala to 2.11.11 and 2.12.2.
  • Upgrade to Scalaz 7.2.11.

Migration:

find . -name '*.scala' -type f -exec perl -pi -e '
  s/initialStateCB_P/initialStateCallbackFromProps/g;
  s/initialStateCB/initialStateCallback/g;
  s/initialState_P/initialStateFromProps/g;
  s/ScalaComponentConfig/ScalaComponent.Config/g;
  s/(Callback(?:To|Option)? *(?:\. *)?(?:traverse|sequence))O(?!\w)/\1Option/g;
' {} +

1.0.0-RC4 (unreleased)

  • Fix typo in Scala builder error message.
  • Add more ScalaDoc to Reusable.
  • Add StateSnapshot.xmap.