Skip to content

Latest commit

 

History

History
99 lines (74 loc) · 3.48 KB

2.0.0-RCs.md

File metadata and controls

99 lines (74 loc) · 3.48 KB

2.0.0-RCx

The full combined list of changes from v1.7.7 to v2.0.0 is here.

Contents:

Changes in RC1

See here.

Changes in RC2

  • Bugfix in the useCallbackWithDeps{,By} hook

  • Changed the pattern in hook signatures from (mainArg: => A, deps: => D) to (deps: D)(mainArg: D => A). Affected methods:

    • useCallbackWithDeps{,By}
    • useEffectWithDeps{,By}
    • useLayoutEffectWithDeps{,By}
    • useMemo{,By}

Changes in RC3

  • Bugfixes:

    • Expose default sync effect instead of internal type in:
      • SetStateFn(…)
      • ModStateFn(…)
      • ModStateWithPropsFn(…)
    • StateSnapshot constructors should accept
      • SetStateFn
      • ModStateFn
      • ModStateWithPropsFn
    • TimerSupport.install had an infinite loop
    • TriStateCheckbox's onKeyDown handler was calling event.preventDefault() on unhandled keys
    • Fix the Scala 3 version of renderBackend to support polymorphic backends (e.g. renderBackend[Backend[X]] where X is a type already in scope)
    • Support CallbackOption[Unit] being passed directly to event handling vdom
  • Additions:

    • TriStateCheckbox now accepts an optional Reusable[TagMod] in its Props that will be applied to the <input>
    • Add .dispatch to Callback and AsyncCallback which schedules (-and-forgets) the callback to be run in the background
  • Upgrade deps

    • Cats-effect to 3.2.2
    • Scala.js to 1.7.0
    • Microlibs to 3.0.1
    • UnivEq to 1.6.0

Changes in RC4

  • Support turning React warnings into runtime exceptions. There are a few ways to do this:

  • Document existing debounce methods to clarify you need to save them as a val and reuse them

  • Add:

    • AsyncCallback.debounce(duration): AsyncCallback[Unit]
    • Callback.debounce(duration): Callback
    • ScalaFnComponent.withReuse{,By}
    • ScalaFnComponent.withChildrenAndReuse{,By}
  • ReactTestUtils is now a trait as well as an object so that you can mix it into your own test utils collection

  • Upgrade deps

    • Cats-effect to 3.2.9
    • Microlibs to 4.0.0
    • Scala.js to 1.7.1
    • scalajs-dom 2.0.0
    • UnivEq to 2.0.0

Changes in RC5

  • Add a new bundle called core-bundle-cb_io with provides core scalajs-react functionality with Callback as the default sync effect and cats.effect.IO as the default async effect. (Thanks @rpiaggio)

Changes in between RC5 and 2.0.0 final

  • Add to callback module:

    • CallbackOption.suspend[A](f: => CallbackOption[A]): CallbackOption[A]
    • CallbackOption.traverse_
    • CallbackOption.sequence_
    • CallbackOption#finallyRun[B](runFinally: CallbackOption[B]): CallbackOption[A]
    • CallbackOption#when_
    • CallbackOption#unless_
  • Add to cats module:

    • Implicit MonadThrow instances for scalajs-react effect types
    • Implicit Monoid instances for scalajs-react effect types with a monoidal value
  • Add ops for working with generic effects via import japgolly.scalajs.react.util.syntax._

  • Refactoring around internal effect-agnosticism type class definitions