v0.2.0-alpha
This release is a preview, and also serves to generate new docs on docs.rs, as the current ones are getting slightly out of sync with our main branch here.
I do not expect significant difficulties in migrating from 0.1.3 to 0.2.0. There are a few API tweaks here that necessitate a version bump but it's an order of magnitude smaller than the change from 0.0.x to 0.1.0 and will not touch most parts of your application.
Breaking Changes
- The
<For/>componentviewargument now takes aScopeas its first argument, i.e., a change fromview=move |counter| { ... }toview=move |cx, counter| { ... } - The
<ErrorBoundary/>componentfallbackargument now takes aFn(Scope, RwSignal<Errors>) -> impl IntoViewinstead ofFn(Scope, Option<RwSignal<Errors>>) -> impl IntoView NodeRefnow takesNodeRef<T>instead ofNodeRef<HtmlElement<T>>. We're also deprecatingNodeRef::new(cx)in favor ofcreate_node_ref(cx)to follow the same pattern as everything else in the framework.- We've finally achieved full consistency between
cargo-leptosand the server integrations whether you're usingcargo-leptosor not. Thesite_addressfield is now namedsite_addr; the compiler should actually prompt you correctly for this one. - The current Leptos global namespace is polluted with a huge number of types and reexports, making it harder to find things in docs and adding compile-time overhead. If you're used to
use leptos::*you may need to manually import a few additional types. We're also no longer reexportingwasm-bindgen,web-sys, andjs-sysso you may need to add them as dependencies to yourCargo.toml - APIs to modify status code and headers in HTTP responses are now synchronous, making them easier to set in components
Other Improvements
- New
<Html/>and<Body/>components inleptos_metathat let you change things like<html>langanddir, and add aclassto the<body> - Restoring
on:event listeners on<Component/>nodes, e.g.,<MyFancyButton on:click=.../>without needing to create anon_clickprop - Adding a
<Redirect/>component in the router that works during client-side navigation or server-side rendering Children,AttributeValue, and other type aliases to make it easier to accept a variety of types in your components- Experimentation with new docs using CodeSandboxes and an expanding set of tutorials
- So, so, so, so many bugfixes, typos, docs improvements, and small changes by many, many, many members of the community. Thanks to you all!
Complete Changelog
- Add
Childrentype alias by @gbj in #403 - Fix boolean attributes in
viewmacro fast-path SSR by @gbj in #408 - Add
<Html/>and<Body/>components inleptos_metaby @gbj in #407 - Minor: Bump typed-builder from 0.11 to 0.12. by @martinfrances107 in #409
- Escape and tokens in documentation markup. by @martinfrances107 in #410
- fix: correct types for top-level
<option>and<use>in SSRviewmacro by @gbj in #416 - Switch RwLock to parking_lot so they are no longer async by @benwis in #414
- Add leptos_routes functions for integrations by @b4-io in #415
- Fix issues with attribute names in SSR by @gbj in #418
- Implemented update_returning for StoredValue by @thestarmaker in #419
- Various tweaks to ErrorBoundary by @benwis in #401
- Fix some small issues in
axum_errorsexample by @gbj in #424 - fix: Make all fragment rendering lazy (closes #299 and #421) by @gbj in #425
- fixes cx not found on components marked with #[component(transparent)] by @jquesada2016 in #423
- Several Minor Updates on Examples by @Indrazar in #427
- Make
RouteDefinitionpublic by @gbj in #430 - docs: Document
inner_htmlattribute by @gbj in #429 - chore: switch examples to
checkinstead ofbuild(for CI) & add missing examples by @gbj in #437 - Fix top-level SVG elements in SSR by @gbj in #435
- fix: correct behavior of
<Show/>by @gbj in #436 - Dedup from_str implementations for Env by @g-re-g in #426
- leptos-server: Removed unused dependency on log, linear-map and rmp-serde. by @martinfrances107 in #439
- leptos_macro: Machete - Removed unused deps. by @martinfrances107 in #441
- router: Machete - Removed unused deps. by @martinfrances107 in #442
- use latest tokio in leptos_axum by @Gentle in #443
- fix: successfully pass context to nested routes via
<Outlet/>by @gbj in #447 - feature: allow
on:event listeners on<Component/>nodes by @gbj in #448 - fix: update leptos dependencies paths to the workspace by @TurboTobias in #449
- fix:
leptos_routerhydration issues by @gbj in #450 - Clippy: "{input} is not a supported environment." by @martinfrances107 in #451
- fix: stack overflow in with nested outlet (closes #452) by @gbj in #453
- fix: typo in
leptos_configdescription by @odiseo0 in #455 - docs: add new
Childrentypes to macro docs by @gbj in #454 - Derive debug for params struct in server macro by @g-re-g in #458
- perf: further reduce WASM binary size by ~5-7% by @gbj in #459
- Fix #457 by @Threated in #460
- docs: add note about optional
fallbackin<Show/>(closes #406) by @gbj in #463 - impl Default for MaybeSignal by @ModProg in #464
- feature: add isomorphic
<Redirect/>component (closes #412) by @gbj in #466 - Add simple icon logo by @underscorefunk in #468
- error on non meta input for prop attribute by @ModProg in #469
- fix: don't override element event listeners with component event listeners by @gbj in #470
- fix: fix
node_refin SSR by @gbj in #471 - Convert site_address to site_addr by @benwis in #462
- impl From<&str> for MaybeSignal by @g-re-g in #472
- fix: correct out-of-order streaming behavior (closes #473) by @gbj in #475
- fix:
cargo docin projects using#[server]by @gbj in #476 - fix: adding/removing errors from
<ErrorBoundary/>by @gbj in #478 - Experiments in new tutorial/guide format with integrated CodeSandboxes by @gbj in #375
- remove unnecessary
"openssl"feature from Actix examples by @gbj in #480 - Better styling for router related components by @Threated in #477
- fix: errors on 404 page in
axum_errorsexample by @gbj in #485 - Minor: Clippy router now uses types OnFormData and OnResponse. by @martinfrances107 in #484
- fix: correct behavior for
inner_htmlin SSR by @gbj in #487 - fix: typed route params with
#[derive(Params)]by @gbj in #488 - Fix node ref generics by @jquesada2016 in #481
- fix: fix
debug_warnbehavior in reactive crate and removelogdependency by @gbj in #491 - change: add
Scopeto view function in<For/>to avoid memory "leak" by @gbj in #492 - fix: error boundary hydration by @gbj in #494
- Suspense: removed unused .clone() call. by @martinfrances107 in #486
- examples: remove unused
index.htmlby @gbj in #497 - Allow literal string as class in view macro by @g-re-g in #500
- fix: proper disposal of nested route scopes by @gbj in #499
- workspace
rustfmtby @jquesada2016 in #483 - apply new formatting everywhere by @gbj in #502
- Docs improvements by @gbj in #505
- fix:
<For/>intodomvcexample by @gbj in #504 - docs: add docs on testing (closes #489) by @gbj in #508
- chore: reorganize module exports and reexports by @gbj in #503
- Typos and a small cleanup by @g-re-g in #509
- fix: import in
leptos_domand add Wasm build to CI for regressions by @gbj in #510 - fix: SSR export in Wasm mode by @gbj in #512
- CI: add Wasm testing by @gbj in #511
- In Axum Integration Remove unwrap() from redirect function by @Indrazar in #513
- remove
.unwrap()fromredirectin Actix integration by @gbj in #514 - version:
0.2.0-alphaby @gbj in #515
New Contributors
- @b4-io made their first contribution in #415
- @thestarmaker made their first contribution in #419
- @g-re-g made their first contribution in #426
- @TurboTobias made their first contribution in #449
- @odiseo0 made their first contribution in #455
- @Threated made their first contribution in #460
- @underscorefunk made their first contribution in #468
Full Changelog: v0.1.3...v0.2.0