Skip to content

Latest commit

 

History

History
48 lines (36 loc) · 1.44 KB

1.6.0.md

File metadata and controls

48 lines (36 loc) · 1.44 KB

1.6.0

  • [Breaking change] Bugfix: when using .componentDidCatch you used to use:

    .error : raw.React.Error
    .info  : raw.React.ErrorInfo

    There are two problems here:

    1. It turns out that the raw.React.Error type isn't really a thing; instead it's the raw exception itself.
    2. Having two raw values to pass around isn't consistent with the rest of the library. There should be one Scala-based value that encapsulates the raw inputs.

    Therefore this has changed so that you now use:

    .error: ReactCaughtError
    
    // which has the following fields (plus a few more):
      .componentStack     : String
      .jsError            : Either[Any, js.Error]
      .message            : String
      .name               : String
      .stack              : String
    
    // in addition to the raw inputs from React:
      .rawError           : js.Any
      .rawInfo            : raw.React.ErrorInfo
  • Router bugfix: explicit fallbacks to conditional routes weren't executing

  • New ext-cats-effect module that provides cats-effect type class instances for:

    • Sync[CallbackTo]
    • Effect[AsyncCallback]
  • Added the following top-level convenience functions:

    val preventDefault: ReactEvent => Callback
    val stopPropagation: ReactEvent => Callback
    val preventDefaultAndStopPropagation: ReactEvent => Callback
  • Dependency upgrades:

    • monocle 2.0.1
    • sourcecode 0.2.0