Releases: reflex-dev/reflex
v0.8.27
Release Notes
Components Improvements
- fix: apply ID to debounceinput even when it is a var. by @abulvenz in #6105
- Origin/matthew collins nz/adddataeditorrowcheckboxvisible by @MatthewCollinsNZ in #6082
- adding row selection mode by @MatthewCollinsNZ in #6090
- Data editor search props by @MatthewCollinsNZ in #6113
Bugfixes
- fix: Preserve event_actions from @rx.event decorator in mixin event handlers by @benedikt-bartscher in #6099
- Fix socket reference shape mismatch in queueEvents by @Dadzemovic in #6094
- fix: Preserve object identity when pickling MutableProxy by @benedikt-bartscher in #6097
- Catch all exceptions in health checks by @masenf in #6089
- Run external servers with
sys.executable -mby @masenf in #6095 - Use homogenous tuple annotation in BaseStateMeta.new by @masenf in #6096
Performance Improvements
- cache get_type_hints for heavy init subclass stuff - improve import performance by @benedikt-bartscher in #6118
Chores
- 0827dev by @adhami3310 in #6091
- bump packaging upper-bound to <27 by @masenf in #6102
- Bump python-multipart from 0.0.21 to 0.0.22 in the uv group across 1 directory by @dependabot[bot] in #6103
- Bump pillow from 12.1.0 to 12.1.1 in the uv group across 1 directory by @dependabot[bot] in #6127
- use get_event_handler in upload, cherry-pick from #6100 by @benedikt-bartscher in #6130
- handle empty getBackendUrl by @adhami3310 in #6093
- Allow granian log level to be set by @masenf in #6131
New Contributors
- @dependabot[bot] made their first contribution in #6103
- @Dadzemovic made their first contribution in #6094
Full Changelog: v0.8.26...v0.8.27
v0.8.26
Release Notes
Upgrade react-markdown to 10.1.0
Behavior Change: functions in component_map will now be passed either a bare string or a list of strings mixed with react element objects. This should only be noticeable if your component map function is attempting to manipulate the children in some way, which is not recommended. For best results, pass all args received by the component function directly to the primary rendered component.
Bugfixes
Chores
- move ai builder to last option by @adhami3310 in #6084
- 0826dev by @adhami3310 in #6081
Full Changelog: v0.8.25...v0.8.26
v0.8.25
Release Notes
Setting "sitemap" to None disables sitemap generation for the page
app.add_page(index, context={"sitemap": None})Bugfixes
- Split REFLEX_CORS_ALLOWED_ORIGINS by comma by @masenf in #6067
- remove
--themefrom __reflex_style_reset.css by @masenf in #6076
Improvements
- improve self aenter typing by @adhami3310 in #6064
- add uuid to deserializers by @adhami3310 in #6073
- Improve templates fetching logic and filtering by @HellAmbro in #6068
Chores
- 0825dev by @adhami3310 in #6065
Full Changelog: v0.8.24...v0.8.25
v0.8.24
Release Notes
Dataeditor Improvements
- Adding new props to the data editor for exposing grid selections by @MatthewCollinsNZ in #6028
Typing
- hide getattribute from type checking by @adhami3310 in #6056
Performance Improvements
Bugfixes
- Skip non-BaseState classes for dep tracking by @masenf in #6052
- ENG-8507: rebind MutableProxy when it is linked to an old _self_state reference by @masenf in #6048
- ENG-8540: avoid dataclasses.asdict in Lost+Found path by @masenf in #6057
- DependencyTracker: only handle STORE_FAST for the GETTING_IMPORT status by @masenf in #6058
Chores
- 0824dev by @adhami3310 in #6053
- publish job by @adhami3310 in #6059
- move pyi generation to initialize and add asserts on pyi contents to publish step by @adhami3310 in #6063
Full Changelog: v0.8.23...v0.8.24
v0.8.23
Release Notes
Shared/Linked State
You can use rx.SharedState to define state that is shared among multiple frontends.
import reflex as rx
class MySharedThing(rx.SharedState):
my_counter: int = 0
@rx.event
async def toggle_link(self):
if not self._linked_to:
await self._link_to(await self.get_var_value(State.shared_token))
else:
return await self._unlink()
@rx.event
def increment(self):
self.my_counter += 1
@rx.event
def decrement(self):
self.my_counter -= 1
@rx.var
def linked_to(self) -> str:
return self._linked_to or "not linked"
@rx.var
def linked_from(self) -> str:
return ", ".join(self._linked_from) or "no links"
@rx.event(background=True)
async def delayed_multi_increment(self, amount: int):
import asyncio
for _ in range(amount):
await asyncio.sleep(1)
async with self:
self.my_counter += 1
class State(rx.State):
@rx.var
def shared_token(self) -> str:
return (self.room or "shared_global").replace("_", "-")
@rx.var
async def current_count(self) -> int:
shared_state = await self.get_state(MySharedThing)
return shared_state.my_counter
@rx.event
async def print_current_count(self):
shared_state = await self.get_state(MySharedThing)
print(f"Current count is: {shared_state.my_counter}")
def index() -> rx.Component:
return rx.container(
rx.color_mode.button(position="top-right"),
rx.vstack(
rx.text(f"Shared token: {State.shared_token}"),
rx.button(f"Linked To: {MySharedThing.linked_to}", on_click=MySharedThing.toggle_link),
rx.text(f"Linked From: {MySharedThing.linked_from}"),
rx.heading(State.current_count),
rx.button(
"Increment",
on_click=MySharedThing.increment,
),
rx.button(
"Increment 5 times with 1s delay",
on_click=MySharedThing.delayed_multi_increment(5),
),
rx.button(
"Decrement",
on_click=MySharedThing.decrement,
),
rx.button(
"Print Current Count to Console",
on_click=State.print_current_count,
),
),
)
app = rx.App()
app.add_page(index, route="/[room]")
app.add_page(index)Add ALEMBIC_INCLUDE_SCHEMAS=1/0 to control include_schema migrations
- add alembic include scehmas by @adhami3310 in #6036
Bugfixes
- do not use react lazy by @adhami3310 in #6033
- ENG-8509: computed var dependency tracking for locally imported states by @masenf in #6035
- turn on inconsistentCjsInterop again by @adhami3310 in #6044
- MutableProxy: do not rebind self for classmethods by @masenf in #6045
- [FIX] Clipboard paste handler binding in dynamically rendered components by @debangshu919 in #6037
Error Improvements
- do not treat str bytes as list by @adhami3310 in #6034
Chores
- 0823dev by @adhami3310 in #6030
- reflex-web integration tests: submodules: recursive by @masenf in #6040
- Update link to ComponentState docs by @masenf in #6042
- Fix computed var dep tracking error message by @masenf in #6039
New Contributors
- @debangshu919 made their first contribution in #6037
Full Changelog: v0.8.22...v0.8.23
v0.8.22
Release Notes
Bugfixes
- RedisStateManager.get_state: return the correct state class by @masenf in #6001
- fix test lifespan on prod by @adhami3310 in #6027
Improvements
- feat: list valid triggers in error message for invalid event triggers by @veerababu1729 in #6015
- fixed types annotations for meta in add_page() to accept components by @dennisbakhuis in #6012
- optimize frozen dict get item by @adhami3310 in #6021
Chores
- 0822dev by @adhami3310 in #6005
- prettier 3.7.x update by @masenf in #6017
- upgrade deps again for 0822 by @adhami3310 in #6022
- update export checkpoints to new vite by @adhami3310 in #6026
New Contributors
- @veerababu1729 made their first contribution in #6015
- @dennisbakhuis made their first contribution in #6012
Full Changelog: v0.8.21...v0.8.22
v0.8.21
Release Notes
Bugfixes
- Don't wrap return values of MutableProxy methods by @masenf in #5986
- ENG-8388: refetch cached state when missing substates by @masenf in #5991
UI
- wrap error text by @adhami3310 in #5992
Chores
- 0821dev by @adhami3310 in #5993
Full Changelog: v0.8.20...v0.8.21
v0.8.20
Release Notes
Reconnection Logic Improvements
- Send a "reconnect" hydrate whenever the socket reconnects by @masenf in #5969
- Make oplock_hold_time_ms configurable by @masenf in #5975
- Do a full re-hydrate on reconnect by @masenf in #5980
- Revive token socket_record after expiration by @masenf in #5977
Bugfixes
- check against hooks inside of root component by @adhami3310 in #5971
- MutableProxy: wrap dataclass and BaseModel methods by @masenf in #5979
Misc
- disable highlighter rich by @adhami3310 in #5972
- Allow
transport="polling"option for all users by @masenf in #5982
Chores
- 0820dev by @adhami3310 in #5967
- Flaky test test_ensure_task_limit_window_passed by @masenf in #5959
- Trying to fix codeql analysis by @masenf in #5981
Full Changelog: v0.8.19...v0.8.20
v0.8.19
Release Notes
Reusing of state locks in redis to reduce serializing/de-serializing overhead
Set REFLEX_OPLOCK_ENABLED=1 in the environment to use this mode -- will become the default after further testing.
Add mime_type to rx.download
- add mime_type to download by @adhami3310 in #5957
Add transport="polling" for enterprise
- add polling transport option by @adhami3310 in #5955
Misc
- add more rules for dialog parents and children by @adhami3310 in #5945
- cache path cwd by @adhami3310 in #5948
- check against classvar for fast case by @adhami3310 in #5947
- optimize _expired_computed_vars to one use of getattribute by @adhami3310 in #5946
Bugfixes
- ENG-8227: always _clean() after app.modify_state by @masenf in #5949
- ENG-8049: pass correct parameters to queueEvents by @masenf in #5962
Chores
- 0819dev by @adhami3310 in #5944
Full Changelog: v0.8.18...v0.8.19
v0.8.18
Release Notes
Improve re-connection logic when running multiple workers
Override async with self to just return self in non background events
- allow state mutation with contextmanager from normal (non-background) events by @benedikt-bartscher in #5938
Bugfixes
- fix problems with does_obj_satisfy_typed_dict by @adhami3310 in #5936
Chores
- 0818dev by @adhami3310 in #5933
Full Changelog: v0.8.17...v0.8.18