Releases: reflex-dev/reflex
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
v0.8.17
Release Notes
Pass event name for lock expiry messages
- add context for lock expiry by @adhami3310 in #5918
Expose Sourcemap generation via VITE_SOURCEMAP, and rolldown experimental HMR via VITE_EXPERIMENTAL_HMR
- expose exp hmr and sourcemap by @adhami3310 in #5906
Misc
- make error boundary look nicer by @adhami3310 in #5926
- more auto_reload_on_error patterns by @masenf in #5925
Bugfixes
- ENG-8034: fix window events inside of memoization leaf by @adhami3310 in #5899
- fix: properly initialize rx.Field annotated backend vars in mixin states by @benedikt-bartscher in #5909
- ENG-8113: handle_frontend_exception triggers auto reload by @masenf in #5922
- ENG-8050: background event updates set
final=Noneby @masenf in #5898
Chores
- Add virtual environment setup instructions to README by @ChloeAnn08 in #5913
- 0817dev by @adhami3310 in #5916
- avoid racey flakes in test_client_storage by @masenf in #5920
New Contributors
- @ChloeAnn08 made their first contribution in #5913
Full Changelog: v0.8.16...v0.8.17
v0.8.16
Release Notes
StateManagerDisk with throttled write
To improve performance on IO-bound devices, disk manager only commits its memory every two seconds or so. Configurable through the environment variable: REFLEX_STATE_MANAGER_DISK_DEBOUNCE_SECONDS
Dialog Trigger must be child of Dialog Root
In technicality, dialog trigger can be anywhere in the nested children of a dialog root. However, this is a useful proxy for now.
- dialog trigger must have dialog root as its parent by @adhami3310 in #5896
Chores
- Change vulnerability reporting email to GitHub link by @adhami3310 in #5890
- 0816dev by @adhami3310 in #5891
- bump codspeed action to v4 by @adhami3310 in #5892
Full Changelog: v0.8.15...v0.8.16