github reflex-dev/reflex v0.8.13

7 hours ago

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

Don't miss a new reflex release

NewReleases is sending notifications on new releases.