scalajs-react now supports the following new features in React v19:
ReactOptions.{Create,Hydrate}Rootnow haswithOnCaughtErrorandwithOnUncaughtErroroptions.- Added
Context.applyas an equivalent alternative toContext.providewhich 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
untypedRefattribute:.withCleanupthat accepts a clean-up function - HTML attributes:
actionandformActionnow take a String, a synchronous callback, or an asynchronous callback. The callback syntax is to use-->or==>just like event-handler attributes. useDeferredValuenow accepts aninitialValuearguseTransition:startTransitionnow accepts async callbacks
React itself no longer provides UMD builds so either
- integrate with something like Vite
- build your own on-demand as demonstrated here
- or get a copy here
- 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
ComponentDomas it's no longer used - Bugfix:
<.div(1: js.UndefOr[Int])now compiles with Scala 3 - Add support for
getDerivedStateFromError
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.