Releases: reflex-dev/reflex
v0.8.10
Release Notes
rx.redirect now takes popup option.
WARNING: This also made it such that is_external and replace are keyword-only arguments.
You can use popup along with is_external to make a popup screen. Be wary that some browsers might block those (occasionally).
- add popup option for redirect by @adhami3310 in #5764
Pass along SQL Alchemy Pool configuration
You can use the environment variables: SQLALCHEMY_POOL_SIZE, SQLALCHEMY_MAX_OVERFLOW, SQLALCHEMY_POOL_RECYCLE, and SQLALCHEMY_POOL_TIMEOUT to configure their corresponding pool configuration.
- add sqlalchemy client pool configuration options via env vars by @benedikt-bartscher in #5751
Determinism Fixes
The Reflex compiler should ideally be deterministic. We fixed a few spots where it wasn't. This included switching from sets to dicts in a few places and fixing the seed for the random ID for components. This should ideally limit the number of unintended HMR errors.
- improve determinism by @adhami3310 in #5755
Styles Fixes
With --env prod, some CSS styles might appear in the wrong order, causing weird styling. This is now fixed.
- put reflexGlobalStyles before everything and add style to radix theme root by @adhami3310 in #5763
Re-add UploadFile.filename to maintain compatibility with Starlette
We removed that property because it had inconsistent value among browsers. Now it's back, but it should be consistent.
- readd UploadFile.filename for compat with StarletteUploadFile by @adhami3310 in #5772
Specify extra_headers to rx.upload_files
In case you want your upload files post request to have extra headers, you can use the extra_headers keyword argument.
- add extra headers to upload event spec by @adhami3310 in #5771
Chores
- 0810dev by @adhami3310 in #5754
Full Changelog: v0.8.9...v0.8.10
v0.8.9
Release Notes
Deprecate state_auto_setters being defaulted to True.
In 0.9.0 this option will default to False. Set it to True if you want to use set_ pattern, or implement setters explicitly.
- deprecate state_auto_setters=True by @adhami3310 in #5739
Option to disable Vite's Hot-Module-Reload
In case you are getting "No module update found for route", you can force full page reload on updates by setting the environment variable VITE_FORCE_FULL_RELOAD to 1. In case you want to disable the reload completely (so refreshing manually to update the page), you can set VITE_HMR to 0.
- add option to disable hmr by @adhami3310 in #5745
ImportVar(tag="*", is_default=True, alias='Alias) works as expected now
It renders to:
import * as Alias from '...'- handle star imports for alias by @adhami3310 in #5743
Wrap additional SVG elements.
Those include: Polyline, SvgImage, Use, TSpan, TextPath, Pattern, ClipPath, Symbol, Mask, ForeignObject, SvgA, Animate, AnimateMotion, AnimateTransform, Set, MPath, Desc, Title, Metadata, Script, SvgStyle, Switch, View
- add few missing svg elements by @adhami3310 in #5742
Performance optimizations
Some cleanups in particularly offending functions. It doesn't affect most things but it does improve things by a bit.
- optimize various functions by @adhami3310 in #5744
- fix issubclass calls by @adhami3310 in #5753
Serialize Memo components as Vars
You can use memo components as Vars of type=type[Component].
- allow memo components to be passed to props by @adhami3310 in #5178
Chores
- 089dev by @adhami3310 in #5736
- ENG-7548: update rx.Config docstring by @LineIndent in #5752
Full Changelog: v0.8.8...v0.8.9
v0.8.8
Release Notes
Performance Optimizations
We replaced jinja2 with simpler fstring calls. This resulted in approximately 30% faster rendering step. We also optimized the import collections by ~15%.
- Replace jinja with fstrings by @adhami3310 in #5720
Add more information to asyncio Tasks
If a task gets cancelled or such now Reflex will add a bit more information to what task that was.
Bugfixes
- use add_style instead of _get_style for drawer components by @adhami3310 in #5734
- rename Event to ReflexEvent by @adhami3310 in #5735
Chores
- 088dev by @adhami3310 in #5719
- improve literal handling in pyi generator by @adhami3310 in #5725
- fix: upgrade lucide-react to 0.541.0 to resolve security issue by @devin-ai-integration[bot] in #5732
Full Changelog: v0.8.7...v0.8.8
v0.8.7
Release Notes
Bugfixes
- add rx memo marker to memo fields by @adhami3310 in #5709
- ENG-7314: Only check for valid app name once per config instance by @masenf in #5710
- use sirv with spa fallback by @adhami3310 in #5711
- do not output plugin warning for sample rxconfig by @adhami3310 in #5715
- fix various issues with frontend_path by @adhami3310 in #5698
Chores
- add return type annotation to toaster by @adhami3310 in #5693
- 087dev by @adhami3310 in #5704
- Split prerequisites into smaller files by @adhami3310 in #5690
- prod build for test icon and dynamic icon by @adhami3310 in #5697
- type hint: handle generic sequence in Var.to by @adhami3310 in #5705
Full Changelog: v0.8.6...v0.8.7
v0.8.6
Release Notes
Misc
- add fill handle to dataeditor by @adhami3310 in #5673
- add rx.PropsBase shortcut by @Lendemor in #5682
- Add SVG marker element support by @devin-ai-integration[bot] in #5683
- allow leak and block detection on handlers by @Lendemor in #5620
- extract env json into its own file by @adhami3310 in #5658
- implement screenshot plugin by @adhami3310 in #5691
Bugfixes
- fix: add missing size property to DynamicIcon class by @geekalaa in #5665
- fix duplicate tab issue by @Lendemor in #4607
- fix: propagate
frontend_pathtobaseinvite.config.jsby @tartansandal in #5677 - ENG-6769: Fix module app.app not found during on_load by @masenf in #5666
- make parent if it doesn't exist for cached procedure by @adhami3310 in #5680
- Fiex: ensure
cls.__dict__compat w/ python3.14 by @xychelsea in #5684 - set background and color for error boundary by @adhami3310 in #5687
- Close files after copying in upload_file by @maximvlah in #5679
Chores
- Fix grammatical error in README: correct 'Our DALL·E. app has an even⦠by @ramansrivastava in #5661
- chore: add a badge to the social network Twitter by @Olexandr88 in #5678
- 086dev by @adhami3310 in #5667
- install only the shell for app harness by @adhami3310 in #5653
- uv sync for pyleak by @adhami3310 in #5685
New Contributors
- @ramansrivastava made their first contribution in #5661
- @geekalaa made their first contribution in #5665
- @Olexandr88 made their first contribution in #5678
- @xychelsea made their first contribution in #5684
Full Changelog: v0.8.5...v0.8.6
v0.8.5
Release Notes
More accurate progress tracking
When compiling a large app, we weren't incrementing the counter for some time-consuming tasks. Like collecting imports and stateful-izing components. Now we do, so the progress bar is a more accurate estimate of how much progress has been made.
- add progrss for imports and statefulizing by @adhami3310 in #5646
Remove autofocus (not auto_focus)
autofocus is an old guy we had and it wasn't working. Now we only have the HTML/React field auto_focus.
- remove autofocus by @adhami3310 in #5644
Make Tag immutable
If you happened to have overwrote _render or such, you might be familiar with Tag. We modified it to be immutable as we have been the victims of misusing its mutability. Review your code that involves _render or render.
- make tag immutable by @adhami3310 in #5641
Bugfixes
- fix httpx client mount verify setting #5632 by @ruhz3 in #5635
- prevent tag special props from being a shared mutable reference by @adhami3310 in #5640
- move address family socket creation to inside of try catch by @adhami3310 in #5637
- completely remove vite in favor of rolldown-vite by @adhami3310 in #5645
- fix prevent AutoScroll hook name collision with unique ID by @ruhz3 in #5650
- get the running loop to compile async state by @adhami3310 in #5657
Chores
- fix reflex-web ci by @adhami3310 in #5642
- upgrade 085dev by @adhami3310 in #5639
- update template links by @adhami3310 in #5652
Cleanups
- do not force import event and page by @adhami3310 in #5559
- simplify error handling for first compile by @adhami3310 in #5628
- move on submit form spec to event.py by @adhami3310 in #5638
- delete unused html props by @adhami3310 in #5643
Full Changelog: v0.8.4...v0.8.5
v0.8.4
Release Notes
Add query_parameters to router.url
It should be similar to router.page.query and be its long-term replacement.
- add origin and query parameters to router url by @adhami3310 in #5596
Bugfixes
- Fix cookie JSON parsing by disabling automatic parsing (ENG-6818) by @devin-ai-integration[bot] in #5616
- check open ports for which address families we can bind to by @adhami3310 in #5621
- snip source correctly for dep tracker by @adhami3310 in #5613
- fix FOUC on refresh by @Lendemor in #5608
- fix breakpoints / flash by @Lendemor in #5627
Chores
- clean up app._compile by @adhami3310 in #5599
- 4dev by @adhami3310 in #5611
- move httpx imports to function scope by @adhami3310 in #5612
- [ENG-6830] add timestamps to debug logs by @masenf in #5618
Full Changelog: v0.8.3...v0.8.4
v0.8.3
Release Notes
Disable stateless app detection
If you have a stateless app, now you need to explicitly set rx.App(enable_state=False) for it to be truly stateless.
- disable stateful app detection by @adhami3310 in #5583
reflex db status
A helpful command to visualize your migrations!
Add rx.el.figure
I'm not sure why it was missing, but better late than never. https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/figure
- Add missing rx.el.figure HTML element by @devin-ai-integration[bot] in #5575
WindowEventListener
You can use rx.window_event_listener to add event handlers to the Window instance. For example:
rx.window_event_listener(on_key_down=rx.console_log)would log key presses on the whole window. It also supports: on_resize, on_scroll, on_focus, on_blur, on_visibility_change, on_before_unload, on_key_down, on_popstate, and on_storage.
Default event action flags in @rx.event
class State(rx.State):
@event(throttle=500, stop_propagation=True)
def handle_with_defaults(self):
passIt supports stop_propagation, prevent_default, throttle, debounce, and temporal.
- add event_action flags to rx.event decorator by @Lendemor in #5574
- fix docstring by @Lendemor in #5592
Increase number of default workers in production
You can change the number of workers in production by setting the GRANIAN_WORKERS. If you don't, and you are using Redis, we set a higher value depending on the number of cores in your CPU.
- increase number of workers from the default one by @adhami3310 in #5586
Add useful information to frontend exceptions
Previously they only had the stack, which was not very helpful. Now they include the type and the message.
- add name and message to frontendend exception handler by @adhami3310 in #5585
Bugfixes
- ENG-6695: Do not allow call_script EventSpec to accept callback after being called by @masenf in #5571
- fix attribute check for SQLAlchemy labeled column properties by @benedikt-bartscher in #5567
- add message to why port is skipped by @adhami3310 in #5584
- check input_type is a str before checking its type by @adhami3310 in #5587
- only delete init if in cwd by @adhami3310 in #5601
Chores
- bump to 083 for dev by @adhami3310 in #5572
- modify the contributing guide a tad bit to use uv run python -m reflex.utils.pyi_generator by @adhami3310 in #5576
- add uv required version by @adhami3310 in #5595
- fix spelling mistakes by @tartansandal in #5606
New Contributors
- @tartansandal made their first contribution in #5606
Full Changelog: v0.8.2...v0.8.3
v0.8.2
Release Notes
Deprecated: overlay_component
rx.App.overlay_component is deprecated. You can use rx.App.extra_app_wraps instead.
For example, if you had:
rx.App(overlay_component=rx.box(rx.text("Overlay Component")))You can instead do:
app = rx.App(
extra_app_wraps={
(1, "Overlay Component"): lambda _: rx.box(rx.text("Overlay Component"))
}
)The (1, "Overlay Component") defines the nestedness and an ID of the Component. The higher the number the higher it is. For example, if ComponentA had nestedness of 1, and ComponentB had a nestedness of 2, then the output is going to be roughly:
<ComponentB>
...
<ComponentA>...</ComponentA>
<ComponentB>The value is a function that takes one boolean argument, that is, if the app is stateful (true) or not (false).
- deprecate overlay_component by @adhami3310 in #5544
Get client ip from X-FORWARDED-FOR header if present
If you were running a your reflex app behind a proxy, this should improve the usefulness of this field.
Enable SitemapPlugin by default
We will enable SitemapPlugin by default for apps that do not specify them in the plugins field. If you want to explicitly enable it, add it to plugins:
rx.Config(
...,
plugins=[rx.plugins.sitemap.SitemapPlugin()],
)Or if you would like to disable it:
rx.Config(
disable_plugins=[
"reflex.plugins.sitemap.SitemapPlugin",
]
)The disable_plugins takes a list of strings representing the fully qualified (module + class name) name of the plugins.
- enable sitemap plugin by default by @adhami3310 in #5558
- _add_builtin_plugins after setting from env by @adhami3310 in #5566
Frontend is public to network by default
Previously, the backend was exposed to local network (0.0.0.0) but frontend wasn't (127.0.0.1). Now frontend matches the backend. We will add an option to change this later (both frontend and backend).
- add --host to react router by @adhami3310 in #5554
rx.Config is now a dataclass
If you were inheriting from rx.Config (for some reason?) you might want to update your code. This provides nicer type hints and might warn you about wrong fields.
- move rx config away from pydantic by @adhami3310 in #5557
Misc
Bugfixes
- Add
propertyprop to Base HTML tag by @masenf in #5548 - check port with bind over connect_ex by @adhami3310 in #5564
Chores
- upgrade to 082dev by @adhami3310 in #5543
- bump rolldown-vite and bun by @adhami3310 in #5563
- pin rollup by @adhami3310 in #5570
Full Changelog: v0.8.1...v0.8.2
v0.8.1
Release Notes
router.url
If you just want the url of the page the user is on, then rx.State.router.url is what you need. It's very similar to urllib.parse url, so you can do host, port, and whatnot. The plan is to move away from router.page.
- add url and route_id to routerdata as a replacement for pagedata by @adhami3310 in #5516
Blur focus
Do you want to de-focus an element? You can use rx.event.blur_focus
Load plugins from environ
If you need to override plugins through an environment variable, now you can do so.
REFLEX_PLUGINS=reflex.plugins.tailwind_v3.TailwindV3Plugin- load plugins from env variable by @adhami3310 in #5524
rx.el.a maps to react router link
You can still get the original through rx.el.elements.a.
Bugfixes
- fix gunicorn in prod mode by @Lendemor in #5521
- use deterministic hash for stateful component names by @adhami3310 in #5525
- Limit scope of bun react-dom/server hack by @masenf in #5532
- only access .name for upload component by @adhami3310 in #5515
- use jsx for root by @adhami3310 in #5535
- add error handling for port process check by @adhami3310 in #5540
- remove keyframes as template string and inline it by @adhami3310 in #5541
Chores
- bump to 081 for dev by @adhami3310 in #5514
New Contributors
Full Changelog: v0.8.0...v0.8.1