Reflex

Latest version: v0.7.2

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

Scan your dependencies

Page 1 of 15

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

0.7.1

Breaking Changes

* `rx.var` decorated functions cannot take arguments (it didn't work before, but now it raises exception)

New Features

`rx.auto_scroll`

A new container that automatically scrolls to the bottom when new content is added.

* Add auto scroll by adhami3310 in https://github.com/reflex-dev/reflex/pull/4790

New Var Operations for StringVar: `.title()`, `.capitalize()`

* add capitalize and title var operations by adhami3310 in https://github.com/reflex-dev/reflex/pull/4840

Improvements

Compile with Main Thread by Default

The new default is to compile pages on the main thread, not using an executor. For most normal-sized apps, this is faster because it avoids spinning up threads and associated overhead.

* give option to only use main thread by adhami3310 in https://github.com/reflex-dev/reflex/pull/4809

Component Props

Components as props was previously working, however in some situations, the necessary hooks/imports/custom_code associated with the component would not propagate up to the parent component and be lost. This change correctly propagates data from the component as prop for correct code generation.

* components deserve to be first class props by adhami3310 in https://github.com/reflex-dev/reflex/pull/4827

Performance
* import var perf improvements by adhami3310 in https://github.com/reflex-dev/reflex/pull/4813
* only write if file changed by adhami3310 in https://github.com/reflex-dev/reflex/pull/4822
* [ENG-4713] Cache pages which add states when evaluating by masenf in https://github.com/reflex-dev/reflex/pull/4788
* [ENG-4776] Write stateful pages marker earlier when should_compile is False by masenf in 4868

Typing
* adjust setter to include type annotation by adhami3310 in https://github.com/reflex-dev/reflex/pull/4726
* fix types for html elements by adhami3310 in https://github.com/reflex-dev/reflex/pull/4768
* actually get rid of callable var fr fr by adhami3310 in https://github.com/reflex-dev/reflex/pull/4821

Miscellaneous
* improve icon error message by adhami3310 in https://github.com/reflex-dev/reflex/pull/4796
* improve hot reload handling by adhami3310 in https://github.com/reflex-dev/reflex/pull/4795
* move overlays to _app.js by adhami3310 in https://github.com/reflex-dev/reflex/pull/4794
* set global loglevel for subprocesses by Lendemor in https://github.com/reflex-dev/reflex/pull/4791
* raise error when passing a str(var) by adhami3310 in https://github.com/reflex-dev/reflex/pull/4769
* Add toast.loading from the sonner package by drbrady8800 in https://github.com/reflex-dev/reflex/pull/4792
* improve into component conversion by adhami3310 in https://github.com/reflex-dev/reflex/pull/4754
* standarize filename from upload by adhami3310 in https://github.com/reflex-dev/reflex/pull/4734
* Wrapping extra components inside of the Context Menu Component by slackroo in https://github.com/reflex-dev/reflex/pull/4831
* treat hyphen as underscore in keys of styles by adhami3310 in https://github.com/reflex-dev/reflex/pull/4810

Bug Fixes
* fix toast provider needed by adhami3310 in https://github.com/reflex-dev/reflex/pull/4801
* invert logic of default hot reload exclusion by adhami3310 in https://github.com/reflex-dev/reflex/pull/4807
* [ENG-4647] Fix env_file handling by masenf in https://github.com/reflex-dev/reflex/pull/4805
* fix port handling by Lendemor in https://github.com/reflex-dev/reflex/pull/4773
* Update rx.get_upload_url signature to accept Var[str] by masenf in https://github.com/reflex-dev/reflex/pull/4826
* simplify toast banner logic by adhami3310 in 4853
* simplify and fix set_color_mode by adhami3310 in 4852
* fix autoscroll on stateful children by adhami3310 in 4858

Version Bumps
* update deps by adhami3310 in https://github.com/reflex-dev/reflex/pull/4804
* upgrade deps as per python 3.10 by adhami3310 in https://github.com/reflex-dev/reflex/pull/4842
* react 19 time by adhami3310 in https://github.com/reflex-dev/reflex/pull/4848
* Override `react-is19.0.0` for recharts compatibility by masenf in 4857

Other Changes

* fix readme typo and update gallery to templates by PeterYusuke in https://github.com/reflex-dev/reflex/pull/4745
* move benchmarks and add some more by Lendemor in https://github.com/reflex-dev/reflex/pull/4758
* Create codeql.yml by Kastier1 in https://github.com/reflex-dev/reflex/pull/4799
* test actions in codeql by Kastier1 in https://github.com/reflex-dev/reflex/pull/4802
* add stateful benchmarks by Lendemor in https://github.com/reflex-dev/reflex/pull/4764
* benchmark experimentation by adhami3310 in https://github.com/reflex-dev/reflex/pull/4811
* bump ruff to 0.9.6 by Lendemor in https://github.com/reflex-dev/reflex/pull/4817
* cache get_type_hints for environment by adhami3310 in https://github.com/reflex-dev/reflex/pull/4820
* remove some benchmarks from CI by adhami3310 in https://github.com/reflex-dev/reflex/pull/4812
* auto hide badge for pro+ users for cloud deployments by Lendemor in https://github.com/reflex-dev/reflex/pull/4819
* Allow any user to set `show_built_with_reflex=False` in any mode by masenf in https://github.com/reflex-dev/reflex/pull/4847
* change error connecting to backend when backend is cold started by adhami3310 in https://github.com/reflex-dev/reflex/pull/4814

New Contributors
* drbrady8800 made their first contribution in https://github.com/reflex-dev/reflex/pull/4792
* slackroo made their first contribution in https://github.com/reflex-dev/reflex/pull/4831

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

0.7.0

Breaking Changes

Python 3.9 support is no longer supported.

Computed Vars are now `cache=True` by default

Explicitly set `cache=False` on Computed Vars that should be updated after every
event, which was the previous default behavior.

The dependency tracking analysis for Computed Vars has been improved to support
async Computed Vars, so there is a possibility for unanticipated behavior change
around tracking dependencies. Please report any bugs encountered in this area.

* computed var default to cache=True by Lendemor in https://github.com/reflex-dev/reflex/pull/4194

Previously "CallableVar" shims need to be explicitly called

* `rx.upload_file` -> `rx.upload_file()`
* `rx.selected_files` -> `rx.selected_files()`
* `rx.clear_selected_files` -> `rx.clear_selected_files()`
* `rx.set_color_mode` -> `rx.set_color_mode()`

Deprecation Removals

Usage of these features prior to 0.7.0 printed a deprecation warning, now they will result in an error.

* `rx.chakra` is removed, use `import reflex_chakra as rc` instead.
* `rx.background` is removed, use `rx.event(background=True)` instead.
* `rx.Component._create_event_chain` is removed, use `rx.EventChain.create` instead.
* `external` prop for `rx.redirect` is removed.
* Unannotated event handler arguments will now raise `MissingAnnotationError`.
* Many internal exceptions were renamed to add a trailing `Error` suffix if that was missing.
* `rx._x.asset` is removed, use `rx.asset` instead.
* Passing a `str` argument to `rx.utils.console.set_log_level` will now raise `TypeError`.
* Removals from `rx.utils.exec`:
* `is_frontend_only` -> `rx.config.environment.REFLEX_FRONTEND_ONLY.get()`
* `is_backend_only` -> `rx.config.environment.REFLEX_BACKEND_ONLY.get()`
* `should_skip_compile` -> `rx.config.environment.REFLEX_SKIP_COMPILE.get()`
* `rx.utils.format.format_event_chain` is removed, use `str(rx.Var.create(chain))` instead.
* `_var_is_local` and `_var_is_string` removed from `rx.Var.create`.
* Computed Vars without a return type annotation will raise `UntypedComputedVarError`.

* removing deprecated features for 0.7.0 and removing py3.9 support by Lendemor in https://github.com/reflex-dev/reflex/pull/4586

`rx.App` fields for internal use now have a `_` prefix

* rename private fields with leading underscore in App by Lendemor in https://github.com/reflex-dev/reflex/pull/4642

New Features

`reflex rename`

A new command to rename an app.

* [ENG-1796]`reflex rename`- B by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/4668

`rx.var` now supports `async` functions

An `rx.var` computed var can now wrap an async function, which can access
arbitrary state via `get_state` and var values via `get_var_value`.

Dependency tracking across states is supported, but there may be edge cases in
the new implementation that prevent depedencies from being automatically
identified. You can pass explicit dependencies to the `deps` argument, and can
add dependencies at runtime via `cls.computed_vars[var_name].add_dependency`.
For best results, pass a globally imported state class to `get_state` and assign
the return value to a local variable in the function.

* [ENG-4326] Async ComputedVar by masenf in https://github.com/reflex-dev/reflex/pull/4711

"Built with Reflex" badge

To raise awareness of Reflex, a sticky "Built with Reflex" badge is added to the
lower right corner of each page.

For subscribers of Reflex Cloud, this badge can be disabled by setting
`show_built_with_reflex=False` in `rxconfig.py` or `SHOW_BUILT_WITH_REFLEX=0` in
the environment.

For more information see: https://reflex.dev/docs/hosting/reflex-branding/

* Add a sticky Built with Reflex badge by Lendemor in https://github.com/reflex-dev/reflex/pull/4584
* Sticky tweaks: only show in prod mode by masenf in 4789

Improvements

Support For Dynamic Icon name

Previously the recommendation was to use `rx.match` to map icons, because the
icon name itself could not be a Var.

With `rx.dynamic_icon`, the name can now be a Var, but performance may be
affected by dynamic loading.

* allow dynamic icons name by Lendemor in https://github.com/reflex-dev/reflex/pull/4636

Support for Specifying Custom App Module

A new config knob is added to `rxconfig.py`, to load the app from a module other than the default.

python
config = rx.Config(
app_name="my_app",
app_module_import="some_package.my_actual_app_module",
)


The app module should be importable by name with the current `PYTHONPATH` / `sys.path`, and contain an `app` attribute.

* [ENG-4134]Allow specifying custom app module in rxconfig by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/4556

Display Warning for Frontend/Backend Version Mismatch

When the frontend and backend versions do not match, a warning is displayed in the console.

* check frontend version on connect by adhami3310 in https://github.com/reflex-dev/reflex/pull/4611
* return websocket protocol when asked by adhami3310 in https://github.com/reflex-dev/reflex/pull/4683
* fix subprotocol for granian by adhami3310 in https://github.com/reflex-dev/reflex/pull/4698

Typing
* improve type support for .get_state by adhami3310 in https://github.com/reflex-dev/reflex/pull/4623
* cast return_expr to Var all the time by adhami3310 in https://github.com/reflex-dev/reflex/pull/4649
* make object var handle all mapping instead of just dict by adhami3310 in https://github.com/reflex-dev/reflex/pull/4602
* add more type annotations through the code by Lendemor in https://github.com/reflex-dev/reflex/pull/4401
* improve var create typing by adhami3310 in https://github.com/reflex-dev/reflex/pull/4701
* improve var base typing by adhami3310 in https://github.com/reflex-dev/reflex/pull/4718
* improve rx.Field ObjectVar typing for sqlalchemy and dataclasses by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/4728
* Add ComputedVar overloads for BASE_TYPE, SQLA_TYPE, and DATACLASS_TYPE by masenf in 4777
* Ensure EventCallback exposes EventActionsMixin properties by masenf in 4772
* make computed var generic over mapping by adhami3310 in 4762
* remove base_state from event types by adhami3310 in 4740

Recharts

* [ENG-4406] cell component wrapper by LineIndent in https://github.com/reflex-dev/reflex/pull/4670
* Fix recharts min width/height by adhami3310 in https://github.com/reflex-dev/reflex/pull/4672
* pie chart type annotation fix by LineIndent in https://github.com/reflex-dev/reflex/pull/4681

Avoid Leaked Websocket connections

* disable react strict mode for event loop by adhami3310 in https://github.com/reflex-dev/reflex/pull/4720

Miscellaneous

* make that one line better by adhami3310 in https://github.com/reflex-dev/reflex/pull/4610
* EventChain.create accepts arbitrary kwargs by masenf in https://github.com/reflex-dev/reflex/pull/4609
* Skip saving page components when skipping compile output by masenf in https://github.com/reflex-dev/reflex/pull/4653
* Allow deploy with project name and app id by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/4550
* Remove token check in reflex deploy by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/4640
* [ENG-4444] move states out of .web by adhami3310 in https://github.com/reflex-dev/reflex/pull/4689
* improve error message for failed compile_state by adhami3310 in https://github.com/reflex-dev/reflex/pull/4702
* assert that .render returns jsonable values by adhami3310 in https://github.com/reflex-dev/reflex/pull/4708
* fix tag render to be recursive by adhami3310 in https://github.com/reflex-dev/reflex/pull/4714
* Handle python `range` passed to rx.Var.create by masenf in https://github.com/reflex-dev/reflex/pull/4716
* var_data fixes with hooks values by adhami3310 in https://github.com/reflex-dev/reflex/pull/4717
* implement a global var cache by adhami3310 in https://github.com/reflex-dev/reflex/pull/4691
* add evaluate time to the progress counter by adhami3310 in https://github.com/reflex-dev/reflex/pull/4722
* better computed var static deps by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/4729
* provide plotly subpackages by adhami3310 in 4776
* Copy/update assets on compile by masenf in 4765
* use getattr when given str in getitem by adhami3310 in 4761
* Resolve custom component version dynamically by masenf in 4759
* `setuptools-scm` support for custom component publishing
* throw error if computed var has args by Lendemor in 4753
* move id to trigger instead of root by adhami3310 in 4752

Bug Fixes
* [ENG-4351] Add mapping for lucide icons by masenf in https://github.com/reflex-dev/reflex/pull/4622
* small fix for color_mode_button by Lendemor in https://github.com/reflex-dev/reflex/pull/4634
* [ENG-4383] Handle special float values on frontend by masenf in https://github.com/reflex-dev/reflex/pull/4638
* put import at the top of dynamic component evaluation by adhami3310 in https://github.com/reflex-dev/reflex/pull/4632
* fix boolean to boolen comparisons by adhami3310 in https://github.com/reflex-dev/reflex/pull/4620
* don't need node when --backend_only is used by Lendemor in https://github.com/reflex-dev/reflex/pull/4641
* check for dict passed as children for component by Lendemor in https://github.com/reflex-dev/reflex/pull/4656
* attempt to fix usage when volta is installing node by Lendemor in https://github.com/reflex-dev/reflex/pull/4664
* reflex export environment should default to prod by adhami3310 in https://github.com/reflex-dev/reflex/pull/4673
* refactor client state to restore prior API by adhami3310 in https://github.com/reflex-dev/reflex/pull/4674
* Fix setting default color mode in dev mode by masenf in https://github.com/reflex-dev/reflex/pull/4616
* fix stuff with bun_path by Lendemor in https://github.com/reflex-dev/reflex/pull/4688
* fix bun path handling and add a test (4785)
* fix bun message (4739)
* import vars are not sortable by adhami3310 in https://github.com/reflex-dev/reflex/pull/4700
* merging two style instance should give a style instance by Lendemor in https://github.com/reflex-dev/reflex/pull/4706
* followup for merge style by Lendemor in https://github.com/reflex-dev/reflex/pull/4721
* fix padding style in textarea by Lendemor in https://github.com/reflex-dev/reflex/pull/4696
* only allow item inside root by Lendemor in https://github.com/reflex-dev/reflex/pull/4697
* allow functools partial with foreach by adhami3310 in https://github.com/reflex-dev/reflex/pull/4709
* make all triggers disable recurisve memoization by adhami3310 in https://github.com/reflex-dev/reflex/pull/4719
* don't memoize tooltip or skeleton children by adhami3310 in 4744
* include dynamic imports for custom components by adhami3310 in https://github.com/reflex-dev/reflex/pull/4725
* fix: allow replacing of _var_type in ComputedVar by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/4730
* [ENG-4570] Fix rx.foreach over dict by masenf in 4743
* Allow template with unspecified demo_url by masenf in 4741

Version Bumps
* bump nextJS to v15 by Lendemor in https://github.com/reflex-dev/reflex/pull/4630
* Bump frontend and backend deps by masenf in https://github.com/reflex-dev/reflex/pull/4667
* update bun to 1.2.0 by adhami3310 in https://github.com/reflex-dev/reflex/pull/4678

Linting / Code Quality
* add some of the TRY rules by Lendemor in https://github.com/reflex-dev/reflex/pull/4651
* add defensive checks against data being funny by adhami3310 in https://github.com/reflex-dev/reflex/pull/4633
* enable N rules for naming conventions by Lendemor in https://github.com/reflex-dev/reflex/pull/4666
* fix version in pyproject and ruff version check by Lendemor in https://github.com/reflex-dev/reflex/pull/4690
* enable PGH, bump pyright and fix all type: ignore by Lendemor in https://github.com/reflex-dev/reflex/pull/4699
* bump ruff version to 0.9.3 by Lendemor in https://github.com/reflex-dev/reflex/pull/4705

Other Changes
* pyproject.toml: bump to 0.7.0dev1 for further development by masenf in https://github.com/reflex-dev/reflex/pull/4604
* Show file and line number in deprecation warnings by masenf in https://github.com/reflex-dev/reflex/pull/4631
* retry failed tests by adhami3310 in https://github.com/reflex-dev/reflex/pull/4675
* remove integration screenshots by adhami3310 in https://github.com/reflex-dev/reflex/pull/4677
* Do not track compile in posthog metrics by masenf in https://github.com/reflex-dev/reflex/pull/4669
* attempt to upgrade windows latest python version by adhami3310 in https://github.com/reflex-dev/reflex/pull/4679
* use older version of python for windows simple benchmarks by adhami3310 in https://github.com/reflex-dev/reflex/pull/4680
* add codspeed by adhami3310 in https://github.com/reflex-dev/reflex/pull/4707
* add backend disabled dialog by adhami3310 in https://github.com/reflex-dev/reflex/pull/4715
* Update disabled backend component by carlosabadia in 4747
* Remove upper pin by Alek99 in https://github.com/reflex-dev/reflex/pull/4684
* fix optional wrapping of static call methods in pyi by adhami3310 in https://github.com/reflex-dev/reflex/pull/4727

New Contributors
* LineIndent made their first contribution in https://github.com/reflex-dev/reflex/pull/4670

**Full Changelog**: https://github.com/reflex-dev/reflex/compare/v0.6.8...v0.7.0

0.6.8

New Features

New API: `rx.EventChain.create`

This new interface makes it easier to transform `EventType` (`EventHandler`, `EventSpec`, and `lambda` - as accepted by component event triggers) into `EventChain` to be rendered in hook calls or `rx.call_script` / `rx.call_function` invocations.

* Move _create_event_chain to EventChain.create by masenf in https://github.com/reflex-dev/reflex/pull/4557

New API: `BaseState.get_var_value`

Similar to `get_state`, this API provides access to a Var defined in another state. If the value is mutable, changing it will be reflected in the other state. This API is intended for use with `ComponentState` implementations that want to "borrow" data from another state.
<details>

<summary>

Show Example Code
</summary>

python
from typing import ClassVar

import reflex as rx


class MyState(rx.State):
data: list[dict] = []


class Appender(rx.ComponentState):
_data: ClassVar[rx.Var]

async def add_value(self, form_data: dict):
(await self.get_var_value(self._data)).append(form_data)

classmethod
def get_component(cls, data: rx.Var[list[dict]]) -> rx.Component:
cls._data = data
return rx.card(
rx.form(
rx.vstack(
rx.input(placeholder="Name", name="name", autofocus=True),
rx.input(placeholder="Email", name="email"),
rx.button("Submit", type="submit"),
),
reset_on_submit=True,
on_submit=cls.add_value,
),
)


appender = Appender.create


def index() -> rx.Component:
return rx.vstack(
rx.foreach(
MyState.data,
lambda d: rx.text(d.to_string()),
),
appender(data=MyState.data),
)


app = rx.App()
app.add_page(index)


</details>

* BaseState.get_var_value helper to get a value from a Var by masenf in https://github.com/reflex-dev/reflex/pull/4553

Improvements

Add `.endswith()` var operation for strings

* Add `endswith` method to String class by 5quinque in https://github.com/reflex-dev/reflex/pull/4577

Simpler API for `rx._x.client_state`

Use client state vars anywhere in the tree instead of having to include them and use them separately.

* improve client state by adhami3310 in https://github.com/reflex-dev/reflex/pull/4597

Support Recursive UI elements with `rx.memo`

See example code in PR. This allows the rendering of trees and other self-referential structures using `rx.foreach`.

* fix recursive UI by adhami3310 in https://github.com/reflex-dev/reflex/pull/4599

Performance
* Minor performance improvements for state getattribute and setattr by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/4543
* improve dynamic route vars, no need to compute deps by benedikt-bartscher in https://github.com/reflex-dev/reflex/pull/4551

Miscellaneous
* fix health check and skip not needed tasks by Lendemor in https://github.com/reflex-dev/reflex/pull/4563
* [ENG-4083] Track internal changes in dataclass instances by masenf in https://github.com/reflex-dev/reflex/pull/4558
* use position in vardata to mark internal hooks by Lendemor in https://github.com/reflex-dev/reflex/pull/4549
* Enable automatic retry on redis errors by masenf in https://github.com/reflex-dev/reflex/pull/4595

Bug Fixes

* Add `expire_on_commit=False` for async sessions by masenf in https://github.com/reflex-dev/reflex/pull/4582
* Do not allow call_function `callback` argument to be added afterwards by masenf in https://github.com/reflex-dev/reflex/pull/4552
* [ENG-2157] [Refix] Allow `rx.download` to resolve `rx.get_upload_url` by masenf in https://github.com/reflex-dev/reflex/pull/4470
* fixes 4578 - correct the way dim_props created by KanvaBhatia in https://github.com/reflex-dev/reflex/pull/4587
* unbreak link _hover by masenf in https://github.com/reflex-dev/reflex/pull/4537
* [ENG-4255] Code blocks lead to redefined const in web page by masenf in https://github.com/reflex-dev/reflex/pull/4598

Version Bumps
* chore: update sonner (toast) by JonZeolla in https://github.com/reflex-dev/reflex/pull/4572
* Upgrade Lucide to version 0.469.0 by celsiusnarhwal in https://github.com/reflex-dev/reflex/pull/4571
* poetry 2.0.0 compatibility by masenf in https://github.com/reflex-dev/reflex/pull/4593

Documentation

Other Changes
* add codespell to pre-commit by Lendemor in https://github.com/reflex-dev/reflex/pull/4559
* autodetect print/breakpoints by Lendemor in https://github.com/reflex-dev/reflex/pull/4581
* HOS-400: adding support for config by Kastier1 in https://github.com/reflex-dev/reflex/pull/4540
* Add deprecation message for non-cached var by masenf in https://github.com/reflex-dev/reflex/pull/4591
* test_lifespan: stop periodic events by masenf in https://github.com/reflex-dev/reflex/pull/4600
* Use older python versions for macos actions by masenf in https://github.com/reflex-dev/reflex/pull/4601

New Contributors
* 5quinque made their first contribution in https://github.com/reflex-dev/reflex/pull/4577
* JonZeolla made their first contribution in https://github.com/reflex-dev/reflex/pull/4572
* celsiusnarhwal made their first contribution in https://github.com/reflex-dev/reflex/pull/4571
* KanvaBhatia made their first contribution in https://github.com/reflex-dev/reflex/pull/4587

**Full Changelog**: https://github.com/reflex-dev/reflex/compare/v0.6.7...v0.6.8

Page 1 of 15

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.