Reflex

Latest version: v0.7.5

Safety actively analyzes 723177 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 16

14.2.13

* bump nextjs version by Lendemor in https://github.com/reflex-dev/reflex/pull/3992

Miscellaneous

* [ENG-3717] [flexgen] Initialize app from refactored code by masenf in https://github.com/reflex-dev/reflex/pull/3918
* Added fill color for progress by wassafshahzad in https://github.com/reflex-dev/reflex/pull/3926
* Use tailwind typography plugin by default by minimav in https://github.com/reflex-dev/reflex/pull/3593
* disable prose by default for rx.html by adhami3310 in https://github.com/reflex-dev/reflex/pull/4001
* use `class_name="prose"` to enable default formatting for `rx.html`
* allow link as metatags by Lendemor in https://github.com/reflex-dev/reflex/pull/3980
* allow classname to be state vars by adhami3310 in https://github.com/reflex-dev/reflex/pull/3991
* default on_submit in form set to prevent_default by Lendemor in https://github.com/reflex-dev/reflex/pull/4005

Bug Fixes

* [ENG-3824]Make AI template use light mode by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/3963
* don't camel case keys of dicts in style by adhami3310 in https://github.com/reflex-dev/reflex/pull/3982
* add missing message when running in backend_only by Lendemor in https://github.com/reflex-dev/reflex/pull/4002
* [ENG-3849] Track backend-only vars that are declared without a default value by masenf in https://github.com/reflex-dev/reflex/pull/4016
* improve lifespan typecheck and debug by Lendemor in https://github.com/reflex-dev/reflex/pull/4014

Documentation

* fix: Adding in-line comments for the segmented control: value and on_change by elviskahoro in https://github.com/reflex-dev/reflex/pull/3933
* fix: Adding code comments for segmented control type by elviskahoro in https://github.com/reflex-dev/reflex/pull/3935

Other Changes

* add some unit tests for coverage by Lendemor in https://github.com/reflex-dev/reflex/pull/3947
* always print passed_type by adhami3310 in https://github.com/reflex-dev/reflex/pull/3950
* remove unused badge by Lendemor in https://github.com/reflex-dev/reflex/pull/3955
* add some more tests by Lendemor in https://github.com/reflex-dev/reflex/pull/3965
* use svg elements instead of raw html for logo by Lendemor in https://github.com/reflex-dev/reflex/pull/3978
* bump to 0.6.1 for further dev by masenf in https://github.com/reflex-dev/reflex/pull/3995
* reorganize all tests in a single top folder by Lendemor in https://github.com/reflex-dev/reflex/pull/3981
* Update markdown component map to use new rx.code_block.theme enum by masenf in https://github.com/reflex-dev/reflex/pull/3996
* remove all runtime asserts by Lendemor in https://github.com/reflex-dev/reflex/pull/4019

New Contributors
* minimav made their first contribution in https://github.com/reflex-dev/reflex/pull/3593
* LeoGrosjean made their first contribution in https://github.com/reflex-dev/reflex/pull/4004

**Full Changelog**: https://github.com/reflex-dev/reflex/compare/v0.6.0...v0.6.1

3.0

* `rx.spinner` - new component for indeterminate loading
* `rx.skeleton` - new component for placeholder loading
* `loading` prop available for
* `rx.button`
* `rx.icon_button`
* `rx.spinner` and `rx.skeleton` -- use `loading=State.is_loading` instead of using `rx.cond`
* `rx.data_list` - new component for showing key value pairs
* `rx._x.progress` - experimental radix themes progress component, supports `duration` for indeterminate progress.

Radix 3.0 by Lendemor in https://github.com/reflex-dev/reflex/pull/3159

New Public API for wrapping Components

To make wrapping components easier and less error prone, the following functions should be overridden when wrapping components:

* `add_style` - return an `rx.style.Style` for default component styles
* `add_imports` - return a dictionary of `{"library-name0.5.0": {"tag1", "tag2", "tag3"}}` of required imports -- it will automatically be merged with the other component imports.
* `add_hooks` - return a list of javascript snippets that will go inside the component function -- it will be deduped automatically with any other hooks
* `add_custom_code` - return a list of javascript snippets that will go inside the module for each page the component is included in.

With these new methods, Reflex will internally call them for each parent class your component inherits from, so there is no need to call `super().add_*` or do any merging yourself.

* [REF-2523] Implement new public Component API by masenf in https://github.com/reflex-dev/reflex/pull/3203
* add_style api by Lendemor in https://github.com/reflex-dev/reflex/pull/3202

`State.setvar(var_name, value)`

A less magic version of the automatic `State.set_x` setter functions which accept the `var_name` as a string.

* [REF-2273] Implement .setvar special EventHandler by masenf in https://github.com/reflex-dev/reflex/pull/3163

Experimental Toast Component

python
def try_some_toast():
return rx.fragment(
rx.button("🥂", on_click=rx._x.toast.info("Cheers"), variant="outline"),
rx._x.toast.provider(),
)


* add toast component by Lendemor in https://github.com/reflex-dev/reflex/pull/3186
Generic `.throttle` and `.debounce` for all Event types

python
class ThrottleState(rx.State):
last_event: datetime.datetime = datetime.datetime.now()

def handle_mouse_move(self):
self.last_event = datetime.datetime.now()

def throttle_example():
return rx.box(
ThrottleState.last_event,
background_color=rx.color("red", 7),
width="500px",
height="500px",
on_mouse_move=ThrottleState.handle_mouse_move.throttle(500), one event every 500ms
)


* Implement `throttle` and `debounce` as event actions by masenf in https://github.com/reflex-dev/reflex/pull/3091

`rx.container` new prop `stack_children_full_width`

For a nice streamlit-like wide layout, use the following snippet:

python
def index():
return rx.container(
rx.vstack(content()),
stack_children_full_width=True,
)


This will cause all vstack/hstack children and most stack child components to have `width="100%"` automatically, which provides a nice aesthetic for many apps without applying CSS to individual components.

* [REF-2574] Default width for Stack (+children) and default padding for container by masenf in https://github.com/reflex-dev/reflex/pull/3104

Improvements

Unify on `ruff-format`
* ruff-format: unify Black with Ruff `v0.1` by Borda in https://github.com/reflex-dev/reflex/pull/2837
* sync ruff version in pyproject.toml with the precommit one by Lendemor in https://github.com/reflex-dev/reflex/pull/3150

Error Messages
* [REF-2636]Improve Error message for unsupported event trigger by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/3147
* prevent shadowing by Lendemor in https://github.com/reflex-dev/reflex/pull/3221
* Better error when a computed var has the same name as an existing state var.
* [REF-2643]Throw Errors for duplicate Routes by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/3155
* [REF-2622]Throw warning for incompatible uvicorn version on windows by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/3246

`rx.color_mode` changes

* `rx.color_mode.button` now has built in positioning prop for floating button
* IconButton for color_mode with nice default and a position props to control it by Lendemor in https://github.com/reflex-dev/reflex/pull/3165

Default style for `rx.upload`

* Refactor upload component and add styled upload component by Ifechukwu001 in https://github.com/reflex-dev/reflex/pull/3035

Use Alembic Batch Mode for `reflex db makemigrations`

This improves compatibility with the default sqlite database when re-typing columns.

* [REF-2658] Alembic should use batch mode for autogenerate by masenf in https://github.com/reflex-dev/reflex/pull/3223

README
* add color dalle code example by tgberkeley in https://github.com/reflex-dev/reflex/pull/3108
* a little correction in the "es" docs by JLDev-coder in https://github.com/reflex-dev/reflex/pull/3127
* Add Japanese README.md file by PeterYusuke in https://github.com/reflex-dev/reflex/pull/3234

Miscellaneous

* add default underline for links by Lendemor in https://github.com/reflex-dev/reflex/pull/3148
* Expose `color_scheme` on TabsTrigger by masenf in https://github.com/reflex-dev/reflex/pull/3112
* update blank template by Lendemor in https://github.com/reflex-dev/reflex/pull/3219
* Clean up config and app API by picklelo in https://github.com/reflex-dev/reflex/pull/3197
* Fixed unused kwargs in reflex.App by Snaipergelka in https://github.com/reflex-dev/reflex/pull/3170
* Now able to pass a custom `SocketIO` instance

Bugfixes

* [REF-2587] Ignore top-level theme appearance by masenf in https://github.com/reflex-dev/reflex/pull/3119
* avoids "flickering" when the top-level appearance differs from user selected mode
* [REF-2619] Re-init when the template is out of date by masenf in https://github.com/reflex-dev/reflex/pull/3121
* Fixed app name validation by Snaipergelka in https://github.com/reflex-dev/reflex/pull/3146
* extend rx.input allowed types by Lendemor in https://github.com/reflex-dev/reflex/pull/3149
* [REF-2682] Foreach over dict uses Tuple arg value by masenf in https://github.com/reflex-dev/reflex/pull/3160
* Improve nested foreach when dict has complex values
* Update CodeBlock class to accept rx.color in custom_style by khhan0130 in https://github.com/reflex-dev/reflex/pull/3168
* Windows `--frontend-only` fix ctrl + c by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/3181
* [REF-2676][REF-2751]Windows Skip ARM devices on bun install + Telemetry by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/3212
* icon_button: Icon size should be specified as int pixels, not str by masenf in https://github.com/reflex-dev/reflex/pull/3247
* copy background task marker by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/3255
* Can now define background tasks in a state mixin
* Dynamic NoSSRComponent properly renders in prod mode when using State/event handlers

Dependencies
* Bump bun version to 1.1.5 by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/3176
* Windows Pin Bun version by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/3192
* Windows Pin Version followup (Use Windows Install Link) by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/3193
* [REF-2764] dep update 0.5.0 by masenf in https://github.com/reflex-dev/reflex/pull/3245
* gunicorn 22.0.0 with security fix

Other Changes
* separate DECORATED_PAGES per reflex app by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/3102
* fix: args issue in `__init__` of App class by nautics889 in https://github.com/reflex-dev/reflex/pull/3141
* [REF-2620] Fallback to npm (not bun) by masenf in https://github.com/reflex-dev/reflex/pull/3138
* pin macos version for CI by Lendemor in https://github.com/reflex-dev/reflex/pull/3145
* [REF-2618] Send template info in init telemetry event by martinxu9 in https://github.com/reflex-dev/reflex/pull/3153
* Integration testing: Firefox compatibility by masenf in https://github.com/reflex-dev/reflex/pull/3162
* Improved get_attribute_access_type by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/3156
* custom component install command to install current project in editable mode by martinxu9 in https://github.com/reflex-dev/reflex/pull/3200
* migrate deprecated redis.close to redis.aclose by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/3199
* allow optional props with None default value by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/3179
* Allow StatefulComponent to also be rendered via `__str__` by masenf in https://github.com/reflex-dev/reflex/pull/3211
* Improved get_attribute_access_type tests by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/3180
* Improved implicit harness app names by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/3237
* do not access state `__subclasses__`, prevent issues with AppHarness by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/3143
* fix screenshot filenames by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/3241
* minor test exp_not_equal fixup by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/3256


New Contributors
* nautics889 made their first contribution in https://github.com/reflex-dev/reflex/pull/3141
* Borda made their first contribution in https://github.com/reflex-dev/reflex/pull/2837
* Snaipergelka made their first contribution in https://github.com/reflex-dev/reflex/pull/3146
* Ifechukwu001 made their first contribution in https://github.com/reflex-dev/reflex/pull/3035
* JLDev-coder made their first contribution in https://github.com/reflex-dev/reflex/pull/3127
* khhan0130 made their first contribution in https://github.com/reflex-dev/reflex/pull/3168

**Full Changelog**: https://github.com/reflex-dev/reflex/compare/v0.4.9...v0.5.0

0.7.5

Release Notes

NextJS back at latest version

As we have had more bugs related to the downgrade, we now have upgraded it back and disable turbopack by default. You can overwrite nextjs version with `NEXTJS_VERSION` but it is very much NOT SUPPORTED. Expect bugs when you do so.

* expose NEXTJS_VERSION and upgrade nextjs by adhami3310 in https://github.com/reflex-dev/reflex/pull/5039
* warn users about nextjs version by adhami3310 in https://github.com/reflex-dev/reflex/pull/5045

Event handlers as Vars

Not flashy, but you can use handlers in conds and such

py
on_click=rx.cond(
SnakeState.game_over,
SnakeState.start_game,
SnakeState.pause_game
)


This only works when the event handler takes no arguments, however, you should use the much more reliable:

py
on_click=rx.cond(
SnakeState.game_over,
SnakeState.start_game(),
SnakeState.pause_game()
)


Where you call the event handlers. You can use lambda syntax to provide arguments for them.

* allow event handlers to be turned into vars by adhami3310 in https://github.com/reflex-dev/reflex/pull/5032

Expose Socket constants for further customizability

Exposes `REFLEX_SOCKET_MAX_HTTP_BUFFER_SIZE`, `REFLEX_SOCKET_INTERVAL`, `REFLEX_SOCKET_TIMEOUT` to be modified.

* expose socket constants by adhami3310 in https://github.com/reflex-dev/reflex/pull/5022

Add support for ndigits for dunder method __round__ for int vars

py
round(State.int_field, 3)


* add ndigits to round dunder method by adhami3310 in https://github.com/reflex-dev/reflex/pull/5019

Expose run_in_thread

`rx.run_in_thread` is a simple wrapper around asyncio to run a function in a different thread.

* promote run_in_thread from experimental by Lendemor in https://github.com/reflex-dev/reflex/pull/5016

Allow `None` as children of components

Previously we errored, but now we allow it, it doesn't render to anything.

* allow none as a child of components by adhami3310 in https://github.com/reflex-dev/reflex/pull/5043

Allow arguments for rx.memo event handlers

py
rx.memo
def counter(on_text: rx.EventHandler[rx.event.passthrough_event_spec(str)]):
return rx.hstack(
rx.button("Increment", on_click=on_text("Increment")),
rx.button("Decrement", on_click=on_text("Decrement")),
)


def index():
return rx.vstack(rx.text("Counter"), counter(on_text=rx.console_log))


You can even define your own event spec

py
def hello_who(who: rx.Var[str]) -> tuple[rx.Var[str]]:
return (rx.Var.create(f"Hello, {who}!"),)


rx.memo
def counter(on_text: rx.EventHandler[hello_who]):
return rx.hstack(
rx.button("Masen", on_click=on_text("Masen")),
rx.button("Not Masen", on_click=on_text("Not Masen")),
)


def index():
return rx.vstack(rx.text("Who Are You?"), counter(on_text=rx.console_log))


* allow arguments to be passed to rx memo event handlers by adhami3310 in https://github.com/reflex-dev/reflex/pull/5021

Bugfixes

* load script directory from config [ENG-5131] by adhami3310 in https://github.com/reflex-dev/reflex/pull/5020
* copy styles to the correct dir by masenf in https://github.com/reflex-dev/reflex/pull/5024
* fix wrong domain for gallery backend by adhami3310 in https://github.com/reflex-dev/reflex/pull/5036
* make sure to str the value in console log by adhami3310 in https://github.com/reflex-dev/reflex/pull/5030
* use package path for dynamic icon by adhami3310 in https://github.com/reflex-dev/reflex/pull/5028
* use granian features to improve hot reload by adhami3310 in https://github.com/reflex-dev/reflex/pull/5023
* Khaleel/eng 5281 typeerror unsupported type ellipsis for guess type by adhami3310 in https://github.com/reflex-dev/reflex/pull/5046
* fix cert errors for package install by adhami3310 in https://github.com/reflex-dev/reflex/pull/5050

Chores

* bump to 0.7.5dev by adhami3310 in https://github.com/reflex-dev/reflex/pull/5018
* Improve AppHarness behavior when app already exists in a relative directory by masenf in https://github.com/reflex-dev/reflex/pull/5025
* make test_call_script more reliable by adhami3310 in https://github.com/reflex-dev/reflex/pull/5038
* add integration test for icons by adhami3310 in https://github.com/reflex-dev/reflex/pull/5037
* make pyright happier by adhami3310 in https://github.com/reflex-dev/reflex/pull/5006
* fix iter parent class method by Lendemor in https://github.com/reflex-dev/reflex/pull/5044

**Full Changelog**: https://github.com/reflex-dev/reflex/compare/v0.7.4...v0.7.5

0.7.4

Release Notes

SASS and SCSS

Thanks to KronosDev-Pro, reflex can now compile your SASS and SCSS files for you! Simply reference a local SASS/SCSS file in the stylesheets key-word argument for rx.App. You need to have libsass installed.

* [IMPL] - added support for sass and scss stylesheet languages by KronosDev-Pro in https://github.com/reflex-dev/reflex/pull/4292
* add libsass to the dev deps by adhami3310 in https://github.com/reflex-dev/reflex/pull/4982

Bun

We used to be using bun as a default for installation, and now we're using it as a runtime as well. In most cases it should work fine, but if it doesn't, you should install `node` in your global system.

This also removes fnm/npm automatic download from reflex and will cut down on the time for new system installs.

* double down on bun over fnm/npm by adhami3310 in https://github.com/reflex-dev/reflex/pull/4906

Granian

We are starting to migrate to Granian as the ASGI that ships with default with Reflex. You can test it with REFLEX_USE_GRANIAN=1. For now there will be some bugs, but we will be resolving them as time comes. Hopefully by 0.8.0 we would have deprecated uvicorn and moved primarily to Granian.

In the same change, you can also run `reflex` from any asgi compliant program, for example:


uvicorn your_app_name.your_app_name:app --factory


* Remove app_module_for_backend by masenf in https://github.com/reflex-dev/reflex/pull/4749
* granian all the way by adhami3310 in https://github.com/reflex-dev/reflex/pull/4994
* move granian to the sidelines by adhami3310 in https://github.com/reflex-dev/reflex/pull/5010

Specify multiple env files

You can pass multiple files (separated by : on linux, ; on windows) for the ENV_FILE environment variable.

* Allow multiple env_file to be specified, split on os pathsep by masenf in https://github.com/reflex-dev/reflex/pull/4993

NextJS downgrade :(

Due to issues we're having with turbopack, we're temporarily downgrading to an earlier version of nextJS 15 until the issues get fixed.

* [ENG-5099] 0.7.4 version bumps (and nextjs downgrade) by masenf in https://github.com/reflex-dev/reflex/pull/4986

Components
* allow cond to mix components and props by adhami3310 in https://github.com/reflex-dev/reflex/pull/4980
* improve logic for icon name handling by adhami3310 in https://github.com/reflex-dev/reflex/pull/4988

Bugfixes
* downgrade annoying log messages by masenf in https://github.com/reflex-dev/reflex/pull/4977
* Fix get_parent_state and get_root_state when using `mixin=True` by masenf in https://github.com/reflex-dev/reflex/pull/4976
* handle range value types [ENG-5143] by adhami3310 in https://github.com/reflex-dev/reflex/pull/4990
* preserve the error message if it was reflex who threw it by adhami3310 in https://github.com/reflex-dev/reflex/pull/5004
* fix str splatting in fallback command by adhami3310 in https://github.com/reflex-dev/reflex/pull/5005
* do not fallback to key name and print tracebacks properly in compile by adhami3310 in https://github.com/reflex-dev/reflex/pull/5003
* fix dynamic components removing all imports form the library by adhami3310 in https://github.com/reflex-dev/reflex/pull/5008
* fix next themes no rerender by adhami3310 in https://github.com/reflex-dev/reflex/pull/5001
* fix: prevent AttributeError when using bare mixins by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/5011
* disable ipv6 by adhami3310 in https://github.com/reflex-dev/reflex/pull/5013
* clean pycache after downloading template, fixes 4135 by adhami3310 in https://github.com/reflex-dev/reflex/pull/5014
* prevent repeat compiles on frontend only apps by adhami3310 in https://github.com/reflex-dev/reflex/pull/5017

Chores
* bump to 0.7.4dev by adhami3310 in https://github.com/reflex-dev/reflex/pull/4978
* add missing pip to uv install in benchmarking action by adhami3310 in https://github.com/reflex-dev/reflex/pull/4979
* make prettier not hog the system by adhami3310 in https://github.com/reflex-dev/reflex/pull/4981
* Download Count by Alek99 in https://github.com/reflex-dev/reflex/pull/4996
* unbreak precommit :( by adhami3310 in https://github.com/reflex-dev/reflex/pull/4997

New Contributors
* KronosDev-Pro made their first contribution in https://github.com/reflex-dev/reflex/pull/4292

**Full Changelog**: https://github.com/reflex-dev/reflex/compare/v0.7.3...v0.7.4

0.7.3

New features

`,` and `_` options for formatted numbers

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

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


* add `,` and `_` operations by adhami3310 in https://github.com/reflex-dev/reflex/pull/4950

Add raw headers to router headers

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


* add raw headers to headers by adhami3310 in https://github.com/reflex-dev/reflex/pull/4958

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`.

* expose svg elements at the el level by adhami3310 in https://github.com/reflex-dev/reflex/pull/4962

New .get var operation

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

python
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!

* add Objectvar.get, Closes 4928 by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/4956

Bug fixes

* fix: every computed var should get it's own static deps by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/4914
* use noopener for window.open by adhami3310 in https://github.com/reflex-dev/reflex/pull/4933
* Support event_actions in Form `on_submit` by masenf in https://github.com/reflex-dev/reflex/pull/4912
* add typehint_issubclass for var_type in style by adhami3310 in https://github.com/reflex-dev/reflex/pull/4946
* be more careful with issubclass use with var_type by adhami3310 in https://github.com/reflex-dev/reflex/pull/4951
* Dedupe custom codes emitted by rx.memo components by masenf in https://github.com/reflex-dev/reflex/pull/4793
* Prepend hydrate event when connecting by masenf in https://github.com/reflex-dev/reflex/pull/4929
* Disconnect old websockets by masenf in https://github.com/reflex-dev/reflex/pull/4953
* add overload for typeddict mapping since their value type is any by adhami3310 in https://github.com/reflex-dev/reflex/pull/4949
* Handle setting loglevel earlier by masenf in https://github.com/reflex-dev/reflex/pull/4964
* remove all get_config at the global scope by adhami3310 in https://github.com/reflex-dev/reflex/pull/4965
* fix: allow multiple middleware postprocess update mutations by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/4970

Error messages

* better error message for return type of computer var by adhami3310 in https://github.com/reflex-dev/reflex/pull/4911
* improve error message for untyped vars by adhami3310 in https://github.com/reflex-dev/reflex/pull/4963
* print warning instead of error with invalid icon by adhami3310 in https://github.com/reflex-dev/reflex/pull/4959

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.

* add .env to gitignore just in case by adhami3310 in https://github.com/reflex-dev/reflex/pull/4909
* lendemor don't use __init__ in pyi_generator by adhami3310 in https://github.com/reflex-dev/reflex/pull/4910
* simplify ai init by Lendemor in https://github.com/reflex-dev/reflex/pull/4932
* update pyproject.toml by adhami3310 in https://github.com/reflex-dev/reflex/pull/4944
* migrate from poetry to uv by adhami3310 in https://github.com/reflex-dev/reflex/pull/4952
* bump reflex to 0.7.3.dev1 by adhami3310 in https://github.com/reflex-dev/reflex/pull/4957
* add template for enterprise, cloud and build issues by Lendemor in https://github.com/reflex-dev/reflex/pull/4961
* middleware attr should be private by Lendemor in https://github.com/reflex-dev/reflex/pull/4939
* prettier by adhami3310 in https://github.com/reflex-dev/reflex/pull/4941
* fix prettier by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/4971
* uv build fixes by adhami3310 in https://github.com/reflex-dev/reflex/pull/4968


**Full Changelog**: https://github.com/reflex-dev/reflex/compare/v0.7.2...v0.7.3

0.7.2

What's Changed

Deprecated instantiating components through Component.__init__

You should have probably been doing `.create`.

* deprecate Component __init__ by adhami3310 in https://github.com/reflex-dev/reflex/pull/4904

Overwrite rx.serializer

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

python
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 https://github.com/reflex-dev/reflex/pull/4888

Use .f with Vars

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

python
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 https://github.com/reflex-dev/reflex/pull/4855

React 19 post-mitigation

* migrate to new react 19 context api by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/4849
* Override `react-is19.0.0` for recharts compatibility by masenf in https://github.com/reflex-dev/reflex/pull/4857
* remove temporary pin on radix ui themes by adhami3310 in https://github.com/reflex-dev/reflex/pull/4878
* make npm behave like bun through legacy-peer-deps by adhami3310 in https://github.com/reflex-dev/reflex/pull/4887
* update all radix deps by adhami3310 in https://github.com/reflex-dev/reflex/pull/4886
* opt for powershell as opposed to wmic by adhami3310 in https://github.com/reflex-dev/reflex/pull/4862

Compiler

* [ENG-4776] Write stateful pages marker earlier when should_compile is False by masenf in https://github.com/reflex-dev/reflex/pull/4868
* reduce badge perf impact on pages by Lendemor in https://github.com/reflex-dev/reflex/pull/4872
* error when computed var fails to compile as opposed to giving a warning by adhami3310 in https://github.com/reflex-dev/reflex/pull/4867
* don't check types that have defaults after what is provided by adhami3310 in https://github.com/reflex-dev/reflex/pull/4889
* make array var sequence first by adhami3310 in https://github.com/reflex-dev/reflex/pull/4881
* special case typed dict when getting value types of object vars by adhami3310 in https://github.com/reflex-dev/reflex/pull/4866
* improve error messages for missing var operations by adhami3310 in https://github.com/reflex-dev/reflex/pull/4869
* don't treat vars as their types for setting state fields by adhami3310 in https://github.com/reflex-dev/reflex/pull/4861
* relax foreach to handle optional by adhami3310 in https://github.com/reflex-dev/reflex/pull/4901
* treat component prop class as immutable when provided a non literal var by adhami3310 in https://github.com/reflex-dev/reflex/pull/4898
* don't use _outer_type if we don't have to by adhami3310 in https://github.com/reflex-dev/reflex/pull/4528

Component changes

* simplify toast banner logic by adhami3310 in https://github.com/reflex-dev/reflex/pull/4853
* fix autoscroll on stateful children by adhami3310 in https://github.com/reflex-dev/reflex/pull/4858
* unbreak accordion animations by adhami3310 in https://github.com/reflex-dev/reflex/pull/4882
* scatter z-axis range fix by tgberkeley in https://github.com/reflex-dev/reflex/pull/4800
* Allow nested responsive container by Alek99 in https://github.com/reflex-dev/reflex/pull/4903
* add recursive memoization to auto scroll if key is provided by adhami3310 in https://github.com/reflex-dev/reflex/pull/4859

Misc

* remove unused function by Lendemor in https://github.com/reflex-dev/reflex/pull/4870
* [ENG-4783] Handle keyspace notif for Redis logical DB > 0 by masenf in https://github.com/reflex-dev/reflex/pull/4877
* remove pynecone mention and update hosting readme by adhami3310 in https://github.com/reflex-dev/reflex/pull/4874
* use lowercase datatypes typing by adhami3310 in https://github.com/reflex-dev/reflex/pull/4843
* add a small guardrail in pyi_generator by Lendemor in https://github.com/reflex-dev/reflex/pull/4885
* fix pyright errors when importing from constants by Lendemor in https://github.com/reflex-dev/reflex/pull/4907


**Full Changelog**: https://github.com/reflex-dev/reflex/compare/v0.7.1...release/reflex-0.7.2

Page 1 of 16

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.