v0.8.0 Pre-release thread #5450
Replies: 9 comments 38 replies
-
Got the following exception when executing: reflex run
|
Beta Was this translation helpful? Give feedback.
-
Another issue on another project: |
Beta Was this translation helpful? Give feedback.
-
In version: 0.8.0a4 A function returned in "add_custom_code" of a wrapped react component is missing when running but it works when running
|
Beta Was this translation helpful? Give feedback.
-
In version: 0.8.0a4 |
Beta Was this translation helpful? Give feedback.
-
I found Plotly still uses dynamic import from Next.js. def dynamic_plotly_import(name: str, package: str) -> str:
"""Create a dynamic import for a plotly component.
Args:
name: The name of the component.
package: The package path of the component.
Returns:
The dynamic import for the plotly component.
"""
return f"""
const {name} = dynamic(() => import('{package}').then(mod => createPlotlyComponent(mod)), {{ssr: false}})
""" In the Next.js version, the |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
in 0.8.0a5 the following exception happens when making a tiny change (just adding a space) to my python file:
|
Beta Was this translation helpful? Give feedback.
-
I've noticed that ctrl-c doesn't fully kill a prod run. I get "Aborted!" printed on the terminal but it never actually stops. |
Beta Was this translation helpful? Give feedback.
-
I have a problem using reflex 0.8.0a in the foreach, the state doesn't change The error I get:
it give me an error in the foreach, it is saying this:
and the state doesn't change, it was working before the update when I do this, the foreach is in the style_selector(): class State(rx.State):
selected_style: str = "Realism"
selected_image: str = ""
def set_style(self, style: str):
print("Debug set_style called with style:", style, "type: ", type(style))
if isinstance(style, str):
self.selected_style = style
else:
self.selected_style = "Realism"
def open_image(self, img: str):
self.selected_image = img
def close_image(self):
self.selected_image = ""
@rx.var
def current_style(self) -> list[str]:
return tattoo_styles.get(self.selected_style, [])
def gallery_image(img_src: str) -> rx.Component:
return rx.dialog.root(
rx.dialog.trigger(
rx.box(
rx.image(
src=img_src,
width="100%",
object_fit="cover",
_hover={"cursor": "pointer"},
on_click=lambda: State.open_image(img_src),
),
width="100%",
)
),
rx.cond(
State.selected_image == img_src,
rx.dialog.content(
rx.box(
rx.dialog.close(
rx.text("✕"),
on_click=lambda: State.close_image(),
style={"cursor": "pointer", "font_size": "1.5rem"},
),
position="absolute",
top="1rem",
right="1rem",
z_index="10",
),
rx.image(src=img_src, width="100%"),
position="relative",
padding="0",
),
),
)
def style_selector() -> rx.Component:
return rx.accordion.root(
rx.accordion.item(
header="Select Style",
content=rx.vstack(
rx.foreach(
list(tattoo_styles.keys()),
lambda style: rx.button(
style,
on_click=lambda s=style: State.set_style(s),
color_scheme="gray",
variant="surface",
is_active=State.selected_style == style,
),
),
spacing="4",
),
value="style_accordion",
),
collapsible=True,
variant="outline",
width="10em",
radius="full",
color_scheme="gray",
)
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Please report any problems you encounter in this discussion thread or as separate issues on reflex-dev/reflex.
pip install 'reflex~=0.8.0a'
Schedule
2025-06-15 22:10 PDT: 0.8.0a1 pre-release published for testing
2025-06-17 18:30 PDT: 0.8.0a2 pre-release published for testing
2025-06-18 13:35 PDT: 0.8.0a3 pre-release published for testing
2025-06-19 15:45 PDT: 0.8.0a4 pre-release published for testing
2025-06-25 09:50 PDT: 0.8.0a5
2025-06-25 22:50 PDT 0.8.0a6
2025-07-01 10:45 PDT 0.8.0a7
2025-07-01: Planned Public release of 0.8.0
0.8.0a7
0.8.0a6
useEffect
normally by @masenf in ImportuseEffect
normally #55010.8.0a5
0.8.0a4
0.8.0a3
0.8.0a2
Release Notes
REMOVED DEPRECATIONS
The following has been removed and was previously deprecated:
UploadFile.filename, deprecated in
0.7.1
. UseUploadFile.name
instead (which strictly returns the file name with no slashes or such). To get the full path, useUploadFile.path
.App.error_boundary, deprecated in
0.7.1
. UseApp.app_wraps
(which has other app wraps as well, most likely you would like to provide those, as well as your different error wrap).App.api
, deprecated in0.7.9
. Useapi_transformer=your_fastapi_app
instead. Read: https://reflex.dev/docs/api-routes/overview#api-transformerApp.add_custom_404_page
, deprecated in0.6.7
. Use add_page with/404
route instead.Component.__init__
, deprecated in0.7.2
. Now it only inits the component and doesn't call post init to add events and such.Non prefixed config env vars, deprecated in
0.7.13
. Things like ENV_FILE now have to be passed explicitly as `REFLEX_ENV_FILE.Gunicorn configuration env variables, deprecated in
0.7.9
. Removed:timeout
,gunicorn_worker_class
,gunicorn_workers
,gunicorn_max_requests
,gunicorn_max_requests_jitter
. If you would like to customize those, I encourage you to either call gunicorn directly (reflex.App is a factory for ASGI apps), or do so using gunicorn environment variable flags.Inferring TailwindV3, deprecated in
0.7.13
. We assume no Tailwind unless explicitly enabled through the plugins config.get_decorated_pages
, deprecated in0.7.9
. If you need to use a similar function you most likely need to implement your own page registry.validate_parameter_literals
, deprecated in0.7.11
. I don't think anyone but us used this function but it's nonetheless removed now.Var._var_name
,Var._var_name_unwrapped
,Var.create_safe
, andVar._type
. All deprecated in various releases. All have better named equivalents.This was done in this PR:
[MAJOR REWRITE] Replace Next with React Router
NextJS has served us well, but the needs of the framework has grown and we hit certain limits that made NextJS a suboptimal choice. To not go too long, compilation times and other factors have encouraged us to cut down on a big dependency that we barely use most of its features.
Breaking Changes
THIS MOST DEFINITELY HAS BREAKING CHANGES. Especially if you used something deeply attached to how JS works. During this prerelease we are going to triage regressions and fix them til they are at an acceptable state.
.web/build/client
(instead of.web/_static
)[REMOVED] reflex.suneditor
We have moved suneditor to its own package: https://github.com/reflex-dev/reflex-suneditor
deprecate suneditor by @adhami3310 in deprecate suneditor #5407
[0.8] remove a bunch of deprecation by @Lendemor in [0.8] remove a bunch of deprecation #5422
[REMOVED] Experimental layout
We will be leaning more heavily into less in the core package (where less, is less opinionated UI).
[Major Rewrite] rx.State no longer inherits from Pydantic
rx.State is now a simple python Class. Nothing that fancy. The changes were made to be backwards compatible but you can optionally use
rx.field(...)
(orrx.field(default_factory=...)
) to define fields more explicitly.[BREAKING] rx.Component.get_event_triggers is now a classmethod
We still invoke it mostly from a self context, but you should port it to be a classmethod.
[Major Rewrite] Remove Pydantic as a dependency of PropsBase
You can use it as before, it's just not a Pydantic class. (TODO: add code here about using component field)
Enable TailwindV4 by default
Newly generated apps with reflex init will have the tailwindV4 plugin enabled by default instead of the v3 one.
Add earlier checks for wrong app names
If you had your name named wrong, now we check that a tad bit earlier in the compile process and with a more helpful message.
Additional Event Info
Now you can use information about the pointer (the mouse thingy) in pointer events. (TODO: remind me to write an example here).
Also you could use on_scroll_end when.. the scroll ends! Unless you are in Safari, in which case you have to wait until they implement that :/
Improved Error Messaging that contains Vars
If you noticed some weird "rx__state__..." names, those are backend vars JS output. Now we strip those form compilation errors and replace them with what you might expect as more normal names. (TODO, add concrete examples)
Add suffix to user defined vars to avoid clash with JS keywords
Javascript has a decent amount of keywords, and sometimes you might accidentally call your variable
package
and get a syntax error. This should solve this.Bugfixes
Misc
Chores
Full Changelog: v0.7.14...release/reflex-0.8.0
Beta Was this translation helpful? Give feedback.
All reactions