Features
- Propagate a frontend
traceparentinto event spans, count websocket connections and message sizes, and wrap the ASGI app when thereflex-otelinstrumentor is active. (#6227)
Bug Fixes
- A backend var whose name is annotated on a state now takes the default declared by a
field()on a base class instead of silently becomingNone, and an error raised by that field'sdefault_factorysurfaces instead of being swallowed. (#6812) - State classes no longer resolve descriptors while being constructed, so a hybrid property's frontend var is no longer built against a half-built class. (#6812)
- Assigning to a state attribute backed by a property (including a
hybrid_property) now runs its setter instead of raisingSetUndefinedStateVarError. (#6812) - Telemetry events are now collected under the submitting thread's registration context, so the background worker reuses the config the app already loaded instead of re-importing
rxconfig.py(and mutatingsys.path) off-thread. (#6960) - Make
reflex.testingimportable without test-only dependencies and provide atestingextra forAppHarness. (#6974) - Mutable proxies over dataclass state values now carry the wrapped type's
__dataclass_params__and__match_args__on their class alongside__dataclass_fields__, so code that inspects a dataclass through the class — reading thefrozen/eqflags or the positional field names afterdataclasses.is_dataclass— no longer raisesAttributeErroron a proxied value. (#7014) AdminDashnow works with starlette-admin 1.0, which renamed the SQLAlchemyAdmin(engine=...)argument tosession_provider. Both starlette-admin 0.x and 1.x are supported. (#7019)- Compiling an app from several processes against one working directory — pytest-xdist workers, parallel builds, or containers sharing a bind mount — no longer aborts with
FileNotFoundErrororFileExistsErrorwhile linking arx.asset(shared=True)file intoassets/external/. A shared asset whose link already points at a different file is repointed at the asset rather than left alone. (#7039) reflex run --env prodandreflex exportno longer fail withFileNotFoundErrorwhenfrontend_pathis set and route prerendering is disabled (REFLEX_SSR=false), and no longer fail on Windows withcannot instantiate 'PosixPath'wheneverfrontend_pathis set. (#7044)- Generate the frontend context module as
utils/context.jsxsoreflex runhot updates keep the state providers mounted; a staleutils/context.jsis removed on the next compile. (#7071)
Performance
- Clear auto-memoization naming caches after compiling app. (#6947)
- New opt-in dev-server knobs:
REFLEX_DEV_PROD_REACT=1serves React's production build under the Vite dev server (navigation CPU on a large app 54 → 36 ms, prod build 24 ms; edits become a full reload since Fast Refresh needs dev React), andREFLEX_VITE_WARMUP_ROUTES=1pre-transforms route modules at startup so the first visit to a page no longer waits on Vite (105–131 → 43–69 ms, or 20–32 ms with both). (#7021) - Trimmed the framework overhead around every event handler: the state fast-paths its own bookkeeping attributes, foreground handler tasks start eagerly on Python 3.12+, the computed-var expiry check only looks at interval vars, route matching is memoized per path, and socket.io handlers run inline. About 28% less CPU per trivial event and 20% more events per second per worker under concurrent load. (#7025)
- Reduce CLI startup time by loading component and cloud command implementations only when invoked, and avoid frontend package reinstalls after backend-only config changes. (#7050)
- Avoid repeated PyPI requests by caching successful latest-version checks for 24 hours and throttling failed checks for one hour. (#7050)
Miscellaneous
- Allow
wrapt2.2 and 2.3. (#7019)