What's Changed
Deprecated instantiating components through Component.init
You should have probably been doing .create
.
- deprecate Component init by @adhami3310 in #4904
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)
- serialize uuid and allow overwriting serializers by @adhami3310 in #4888
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
.
- add support for .f format by @adhami3310 in #4855
React 19 post-mitigation
- migrate to new react 19 context api by @benedikt-bartscher in #4849
- Override
react-is@19.0.0
for recharts compatibility by @masenf in #4857 - remove temporary pin on radix ui themes by @adhami3310 in #4878
- make npm behave like bun through legacy-peer-deps by @adhami3310 in #4887
- update all radix deps by @adhami3310 in #4886
- opt for powershell as opposed to wmic by @adhami3310 in #4862
Compiler
- [ENG-4776] Write stateful pages marker earlier when should_compile is False by @masenf in #4868
- reduce badge perf impact on pages by @Lendemor in #4872
- error when computed var fails to compile as opposed to giving a warning by @adhami3310 in #4867
- don't check types that have defaults after what is provided by @adhami3310 in #4889
- make array var sequence first by @adhami3310 in #4881
- special case typed dict when getting value types of object vars by @adhami3310 in #4866
- improve error messages for missing var operations by @adhami3310 in #4869
- don't treat vars as their types for setting state fields by @adhami3310 in #4861
- relax foreach to handle optional by @adhami3310 in #4901
- treat component prop class as immutable when provided a non literal var by @adhami3310 in #4898
- don't use _outer_type if we don't have to by @adhami3310 in #4528
Component changes
- simplify toast banner logic by @adhami3310 in #4853
- fix autoscroll on stateful children by @adhami3310 in #4858
- unbreak accordion animations by @adhami3310 in #4882
- scatter z-axis range fix by @tgberkeley in #4800
- Allow nested responsive container by @Alek99 in #4903
- add recursive memoization to auto scroll if key is provided by @adhami3310 in #4859
Misc
- remove unused function by @Lendemor in #4870
- [ENG-4783] Handle keyspace notif for Redis logical DB > 0 by @masenf in #4877
- remove pynecone mention and update hosting readme by @adhami3310 in #4874
- use lowercase datatypes typing by @adhami3310 in #4843
- add a small guardrail in pyi_generator by @Lendemor in #4885
- fix pyright errors when importing from constants by @Lendemor in #4907
Full Changelog: v0.7.1...release/reflex-0.7.2