v0.5.0-alpha #1438
Replies: 6 comments 8 replies
-
is it a duplicate of #1437 ? |
Beta Was this translation helpful? Give feedback.
-
I remember there was some discussion along the lines of not requiring closures to track anymore, and any call to |
Beta Was this translation helpful? Give feedback.
-
maybe not super helpful, but I upgraded a small app with no issue! love the new DX! |
Beta Was this translation helpful? Give feedback.
-
Hey I am pretty new to this, but I think I found an issue. I have a component that renders a form with multiple Here is a resume of my component The issue I am facing is that the country select doesn't get its options populated, no options (other than the hardcoded empty one) get's added to the select. When debugging, I do see the network call beeing done and returning the expected format & everything. I can even log the list I am receiving. And note also, this was working before the upgrade. I am suspecting a problem with the Suspense component where the context isn't correctly "shared" between the 2 I have? |
Beta Was this translation helpful? Give feedback.
-
Just a field report, in response to the "Help Wanted" section I bumped a app from 0.3 to 0.5.0-alpha everything went well Here is the relevant leptos entries in my manifest , so if there any show stoppers in other sub-crates .. then I would not have seen them leptos = { version = "0.5.0-alpha", default-features = false, features = ["serde"] } So everything is positive from me... Only a minor feedback from the wording in the release note specifically around the phrase "empty string" in the examples -- it is difficult to convey that the use should leave a blank space in a certain position
I have to say I found the "empty string" thing a little difficult to digest If you are publishing a migration guide, can I suggest a more explicit example - nothing more than this
becomes
as a "example" saves a thousand words. |
Beta Was this translation helpful? Give feedback.
-
When building with Actix using Leptos 0.5.0-alpha2, you must also change your cargo.toml dependency to |
Beta Was this translation helpful? Give feedback.
-
This long-awaited release significantly changes how the reactive system works. This should solve several correctness issues/rough edges that related to the manual use of
cx
/Scope
and could create memory leaks. (See #918 for details)It also has the fairly large DX change (improvement?) of removing the need to pass
cx
orScope
variables around at all.Migration is fairly easy. 95% of apps will migrate completely by making the following string replacements:
cx: Scope,
=> (empty string)cx: Scope
=> (empty string)cx,
=> (empty string)(cx)
=>()
|cx|
=>||
Scope,
=> (empty string)Scope
=> (empty string) as needed|_, _|
that become|_|
or|_|
that become||
, particularly for thefallback
props on<Show/>
and<ErrorBoundary/>
Basically, there is no longer a
Scope
type, and anything that used to take it can simply be deleted.For the 5%: if you were doing tricky things like storing a
Scope
somewhere in a struct or variable and then reusing it, you should be able to achieve the same result by storingOwner::current()
somewhere and then later using it inwith_owner(owner, move || { /* ... */ })
.There are no other big conceptual or API changes in this update: essentially all the same reactive, templating, and component concepts should still apply, just without
cx
.Expected to Not Work
leptosfmt
andcargo leptos --hot-reload
, which assume that theview!
needs acx,
, will probably not work as intended and will need to be updated.Any other ecosystem libraries that depend on Leptos 0.4 won't work, of course.
Help Wanted
This needs pretty extensive testing with real apps. It passes our test suite and the examples seem to work fine, but I'm sure there are bugs out there. Help find them! I've created a discussion linked to these release notes that you can use for feedback or to help track down bugs.
This discussion was created from the release v0.5.0-alpha.
Beta Was this translation helpful? Give feedback.
All reactions