github reflex-dev/reflex v0.7.3

22 hours ago

New features

, and _ options for formatted numbers

class State(rx.State):
    large_number: float = 123123213.21321312

rx.text(f"{State.large_number:,.3f}")

Add raw headers to router headers

class State(rx.State):
    @rx.event
    def on_event(self):
        print(self.router.header.raw_headers) # read only header mapping

Expose SVG elements at the el level

We are trying to reach parity where all acceptable HTML elements are exposed at the .el scope, now you can use text, line, circle, ellipse, rect, polygon, path, stop, linear_gradient, radial_gradient, defs.

New .get var operation

Useful accessing State vars typed as dicts/dataclasses/pydantic modedls to provide a default if the key is possibly absent.

class State(rx.State):
    field: rx.Field[dict[str, int]] = rx.field({"josh": 96, "john": 32})

State.field.get("joseph", 0)

Thanks for @benedikt-bartscher for the contribution!

Bug fixes

Error messages

Chores

We are now using uv in the main repo. Or at least we moved off of poetry as it did not support certain features in pyproject.toml. Realistically, everything in pyproject.toml is standard and should be fine to use by any package manager.

Full Changelog: v0.7.2...v0.7.3

Don't miss a new reflex release

NewReleases is sending notifications on new releases.