Skip to content

Releases: reflex-dev/reflex

v0.8.22

09 Dec 21:13

Choose a tag to compare

Release Notes

Bugfixes

Improvements

Chores

New Contributors

Full Changelog: v0.8.21...v0.8.22

v0.8.21

24 Nov 21:04
cb262b6

Choose a tag to compare

Release Notes

Bugfixes

  • Don't wrap return values of MutableProxy methods by @masenf in #5986
  • ENG-8388: refetch cached state when missing substates by @masenf in #5991

UI

Chores

Full Changelog: v0.8.20...v0.8.21

v0.8.20

17 Nov 19:50
4ee713f

Choose a tag to compare

Release Notes

Reconnection Logic Improvements

  • Send a "reconnect" hydrate whenever the socket reconnects by @masenf in #5969
  • Make oplock_hold_time_ms configurable by @masenf in #5975
  • Do a full re-hydrate on reconnect by @masenf in #5980
  • Revive token socket_record after expiration by @masenf in #5977

Bugfixes

  • check against hooks inside of root component by @adhami3310 in #5971
  • MutableProxy: wrap dataclass and BaseModel methods by @masenf in #5979

Misc

Chores

Full Changelog: v0.8.19...v0.8.20

v0.8.19

10 Nov 20:02

Choose a tag to compare

Release Notes

Reusing of state locks in redis to reduce serializing/de-serializing overhead

Set REFLEX_OPLOCK_ENABLED=1 in the environment to use this mode -- will become the default after further testing.

Add mime_type to rx.download

Add transport="polling" for enterprise

Misc

Bugfixes

  • ENG-8227: always _clean() after app.modify_state by @masenf in #5949
  • ENG-8049: pass correct parameters to queueEvents by @masenf in #5962

Chores

Full Changelog: v0.8.18...v0.8.19

v0.8.18

03 Nov 23:32

Choose a tag to compare

Release Notes

Improve re-connection logic when running multiple workers

  • ENG-8089: Implement Lost+Found with RedisTokenManager by @masenf in #5927

Override async with self to just return self in non background events

Bugfixes

Chores

Full Changelog: v0.8.17...v0.8.18

v0.8.17

27 Oct 17:49

Choose a tag to compare

Release Notes

Pass event name for lock expiry messages

Expose Sourcemap generation via VITE_SOURCEMAP, and rolldown experimental HMR via VITE_EXPERIMENTAL_HMR

Misc

Bugfixes

  • ENG-8034: fix window events inside of memoization leaf by @adhami3310 in #5899
  • fix: properly initialize rx.Field annotated backend vars in mixin states by @benedikt-bartscher in #5909
  • ENG-8113: handle_frontend_exception triggers auto reload by @masenf in #5922
  • ENG-8050: background event updates set final=None by @masenf in #5898

Chores

New Contributors

Full Changelog: v0.8.16...v0.8.17

v0.8.16

21 Oct 03:34

Choose a tag to compare

Release Notes

StateManagerDisk with throttled write

To improve performance on IO-bound devices, disk manager only commits its memory every two seconds or so. Configurable through the environment variable: REFLEX_STATE_MANAGER_DISK_DEBOUNCE_SECONDS

  • ENG-7948: StateManagerDisk deferred write queue by @masenf in #5883

Dialog Trigger must be child of Dialog Root

In technicality, dialog trigger can be anywhere in the nested children of a dialog root. However, this is a useful proxy for now.

Chores

Full Changelog: v0.8.15...v0.8.16

v0.8.15

15 Oct 02:36

Choose a tag to compare

Release Notes

Deprecations

rx.Base is deprecated.

Now that pydantic is an optional dependency, Reflex will no longer maintain a custom wrapper over BaseModel. You have a few options for replacing your rx.Base subclasses:

  • Continue to use pydantic -- minimal code/behavior changes
    • Ensure pydantic is part of your app dependency list
    • Extend from pydantic.BaseModel instead of rx.Base
  • Move to dataclasses.dataclass -- use the python stdlib
  • Move to typing.TypedDict -- uses a plain dict, but has extra type hints to make Var Operations work correctly

sqlmodel.SQLModel is now recommended over rx.Model.

  • Change your db models to inherit from sqlmodel.SQLModel instead of rx.Model.
  • Ensure the model has an explicit primary_key column. The default previously used to be:
    • id: int | None = sqlmodel.Field(default=None, primary_key=True)
  • Use sqlmodel.select(MyModel) instead of MyModel.select().

Python 3.14 is now supported! Python 3.10 deprecated D:

Python 3.14 got release on 10/07 and now Reflex supports it! It gives us very considerable performance improvements just by bumping.

In theory, you can use reflex with python free threaded, although we don't officially support it just yet. If you do run into issues with it, do report it!

Make pydantic, sqlmodel, and alembic optional

We will still install them by default until 0.9. You can ease into the transition by setting your reflex dependency to reflex[db]. You can uninstall them and reflex will continue to work assuming you don't use those in your app.

Upcast enum values to their enum type on event handlers

  • Upcast str or int to annotated Enum type in event handlers by @masenf in #5855

Performance Improvements

Bugfixes

  • make on load lambda work by @adhami3310 in #5856
  • Apply attribute access rules for Model or SQLModel by @masenf in #5875
  • Munge router_data["pathname"] consistently in event processing path by @masenf in #5873
  • ENG-7948: Fix hanging frontend and other reconnection woes by @masenf in #5884
  • check domain before redirecting in codespaces by @adhami3310 in #5886

Chores

Full Changelog: v0.8.14...v0.8.15

v0.8.14

06 Oct 20:39

Choose a tag to compare

Release Notes

Revert ColorVar having .color .alpha .shade

ColorVar being a non primitive string (new String) has proven more problematic than it is useful.

Add --single-port option to reflex run --env prod

Since the app is compiled, there is no need for using a node server to run the frontend and have two ports. You can simply use reflex run --env prod --single-port to host the frontend and backend on the same port.

It's still recommended to serve your frontend on a CDN if possible. Although if you're going for really simple deployments, one port will suffice!

Treat on_drop=State.handle_upload, as on_drop=State.handle_upload(rx.upload_files(upload_id))

the following:

rx.upload(
    id="upload",
    on_drop =State.on_upload,
)

would be converted to

rx.upload(
    id="upload",
    on_drop =State.on_upload(rx.upload_files("upload")),
)

Add primitive radix dialog

It's unstyled, but it makes it easier to use with tailwind and such if you aren't interested in radix themes.

def dialog():
    return rx.radix.primitives.dialog.root(
        rx.radix.primitives.dialog.trigger(...),
        rx.radix.primitives.dialog.portal(
            rx.radix.primitives.dialog.overlay(...),
            rx.radix.primitives.dialog.content(
                rx.radix.primitives.dialog.title(...),
                rx.radix.primitives.dialog.description(...),
                ...,
                rx.radix.primitives.dialog.close(...)
            )
        )
    )

The interface looks almost identical to rx.dialog.

Bugfixes

Chores

Full Changelog: v0.8.13...v0.8.14

v0.8.13

29 Sep 18:54

Choose a tag to compare

Release Notes

Rework ColorVar to support its subfields

class State(rx.State):
    theme: rx.Color = rx.color("red", 2)

# All of those are valid:
State.theme
State.theme.color
State.theme.shade
State.theme.alpha
  • rework transformers and serialize subfields of color vars by @adhami3310 in #5819

Upgrade react-player (rx.video) to v3

There are some providers that got removed in the update and the API changed. We added a mapping to maintain them as close as possible. If you get any deprecation warnings related to rx.video that's why.

Automatically convert time and date from str if event handler function is typed as such

If you have an event handler:

import datetime
class State(rx.State):
    @event
    def receive_datetime(self, t: datetime.datetime):
        ...

Then you can do:

State.receive_datetime(datetime.datetime.now())

That used to fail, since we go to the frontend and back, which would serialize the datetime into a string to be stored in JSON. Now we attempt to convert the str into the typed parameter if possible for datetime objects.

Add option to disable server-side rendering for reflex export and reflex deploy

You can pass --no-ssr to the commands to disable react router per-rendering routes. Note that might hurt your SEO performance. You can also configure that with REFLEX_SSR=1/0.

Bugfixes

Chores

Full Changelog: v0.8.12...v0.8.13