github reflex-dev/reflex v0.9.9a2

pre-release3 hours ago

Breaking Changes

  • A RegistrationContext can only be associated with a single App instance, so creating a second bare rx.App() in one process now raises ReflexRuntimeError (0.9.8 allowed it); use a fresh RegistrationContext (e.g. RegistrationContext.fork()) to create multiple apps. The module-level reflex.page.DECORATED_PAGES registry has moved onto the active RegistrationContext as decorated_pages; reading the old name still works as a deprecated shim that is removed in 1.0. (#6382)

Deprecations

  • reflex.components.dynamic.bundled_libraries and DEFAULT_BUNDLED_LIBRARIES are deprecated (removal in 1.0) but keep working: reading either emits a deprecation warning and resolves against the active RegistrationContext. Use RegistrationContext.ensure_context().bundled_libraries to read the list, or bundle_library() / reset_bundled_libraries() to modify it. (#6967)
  • reflex.page.DECORATED_PAGES is deprecated (removal in 1.0) but keeps working: reading it emits a deprecation warning and resolves to a mapping of the app name to the active RegistrationContext's decorated_pages list of (render_fn, kwargs) entries. Use RegistrationContext.ensure_context().decorated_pages instead. (#6985)

Bug Fixes

  • Cancelling stale on_load work on navigation also applies to on_load handlers that are background tasks (@rx.event(background=True)): navigating away now cancels such a task mid-flight, where 0.9.8 let it run to completion. Background tasks started from regular (non-superseding) events are unaffected. (#6593)
  • Reduce published wheel and sdist size by removing misplaced generated artifacts. (#6966)
  • A client_error socket emit with no payload no longer raises an unhandled TypeError inside python-socketio's dispatch, which let any connected socket — even one without a valid token — spam asyncio tracebacks into the backend logs past the handler's rate limits. A missing payload is now dropped by the same guard that handles other malformed payloads. (#6984)
  • Console warnings and errors no longer print literal backslash-escaped brackets (e.g. dict\[str, str]). The rich-markup escapes were left over from the legacy console helpers, but the logging pipeline renders messages with markup disabled, so bracketed type names now print verbatim. VarAttributeError messages drop the same escapes. (#6989)
  • reflex run no longer hangs forever when a fatal error (e.g. the node minimum-version check on the npm path) exits the frontend worker thread while the backend blocks the main thread; the failure now interrupts the main thread and the CLI exits promptly with the original error. (#6990)
  • Fixed an edge in the new fatal-error interrupt handling where a task failing after the with-body raised its own exception could deliver a stray SIGINT to unrelated caller code. (#6994)

Performance

  • The generated vite.config.js now declares a hook filter on the plugin that redirects react-dom/server to react-dom/server.node, so the bundler no longer calls into it for every import in the module graph — on the Reflex docs site that was ~15,800 calls per build to rewrite a single specifier. The local plugin import in the config also carries a file extension now, silencing Vite's warning about features its native config loader cannot resolve. (#6959)

Don't miss a new reflex release

NewReleases is sending notifications on new releases.