Skip to content

Latest commit

 

History

History
43 lines (35 loc) · 1.92 KB

File metadata and controls

43 lines (35 loc) · 1.92 KB

4.0.0

React v19

scalajs-react now supports the following new features in React v19:

  • ReactOptions.{Create,Hydrate}Root now has withOnCaughtError and withOnUncaughtError options.
  • Added Context.apply as an equivalent alternative to Context.provide which will be deprecated in future
  • Added React.Activity
  • Added React.use(Promise[A] | Context[A]): A
  • Added ReactDOM.preconnect
  • Added ReactDOM.prefetchDNS
  • Added ReactDOM.preinit
  • Added ReactDOM.preload
  • Added ReactDOM.requestFormReset
  • Added new hook: useActionState
  • Added new hook: useEffectEvent
  • Added new hook: useFormStatus
  • Added new hook: useOptimistic
  • Added new HTML attribute: precedence
  • Added to HTML untypedRef attribute: .withCleanup that accepts a clean-up function
  • HTML attributes: action and formAction now take a String, a synchronous callback, or an asynchronous callback. The callback syntax is to use --> or ==> just like event-handler attributes.
  • useDeferredValue now accepts an initialValue arg
  • useTransition: startTransition now accepts async callbacks

React itself no longer provides UMD builds so either

Other

  • Delete all deprecated code — ensure you update to 3.0.0 and resolve deprecation warnings before upgrading to 4.0.0
  • Upgrade Cats Effect to 3.7.0
  • Delete ComponentDom as it's no longer used
  • Bugfix: <.div(1: js.UndefOr[Int]) now compiles with Scala 3
  • Add support for getDerivedStateFromError

Support

If you'd like to support me and this library please become a patron! I do all my OSS work unpaid so showing your support will make a big difference.