Skip to content

v0.7.2

Latest
Compare
Choose a tag to compare
@adhami3310 adhami3310 released this 12 Mar 18:47

What's Changed

Deprecated instantiating components through Component.init

You should have probably been doing .create.

Overwrite rx.serializer

You can overwrite a serializer in reflex through @rx.serializer (previously we were erroring here), for example:

@serializer(to=str, overwrite=True) # overwrite flag here suppresses warning about overriding a builtin serializer as an intentional decision
def serialize_uuid(uuid: UUID) -> str:
    return "UUID" + str(uuid)

Use .f with Vars

You can now use the .f in f-strings with state Vars, for example:

class State(rx.State):
  value_of_pi: float = 3.14159265359

rx.text(f"{State.value_of_pi:.2f}")

Note that we now error when you provide a formatter that we don't support. PRs are welcome in extending the functionality beyond :.Xf.

React 19 post-mitigation

Compiler

Component changes

Misc

Full Changelog: v0.7.1...release/reflex-0.7.2