github leptos-rs/leptos v0.2.0-alpha
`v0.2.0-alpha`

latest releases: v0.7.0-rc1, v0.7.0-rc0, v0.7.0-gamma3...
pre-release21 months ago

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/> component view argument now takes a Scope as its first argument, i.e., a change from view=move |counter| { ... } to view=move |cx, counter| { ... }
  • The <ErrorBoundary/> component fallback argument now takes a Fn(Scope, RwSignal<Errors>) -> impl IntoView instead of Fn(Scope, Option<RwSignal<Errors>>) -> impl IntoView
  • NodeRef now takes NodeRef<T> instead of NodeRef<HtmlElement<T>>. We're also deprecating NodeRef::new(cx) in favor of create_node_ref(cx) to follow the same pattern as everything else in the framework.
  • We've finally achieved full consistency between cargo-leptos and the server integrations whether you're using cargo-leptos or not. The site_address field is now named site_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 reexporting wasm-bindgen, web-sys, and js-sys so you may need to add them as dependencies to your Cargo.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 in leptos_meta that let you change things like <html> lang and dir, and add a class to the <body>
  • Restoring on: event listeners on <Component/> nodes, e.g., <MyFancyButton on:click=.../> without needing to create an on_click prop
  • 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 Children type alias by @gbj in #403
  • Fix boolean attributes in view macro fast-path SSR by @gbj in #408
  • Add <Html/> and <Body/> components in leptos_meta by @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 SSR view macro 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_errors example 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 RouteDefinition public by @gbj in #430
  • docs: Document inner_html attribute by @gbj in #429
  • chore: switch examples to check instead of build (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_router hydration 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_config description by @odiseo0 in #455
  • docs: add new Children types 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 fallback in <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_ref in 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 doc in 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_errors example by @gbj in #485
  • Minor: Clippy router now uses types OnFormData and OnResponse. by @martinfrances107 in #484
  • fix: correct behavior for inner_html in 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_warn behavior in reactive crate and remove log dependency by @gbj in #491
  • change: add Scope to 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.html by @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 rustfmt by @jquesada2016 in #483
  • apply new formatting everywhere by @gbj in #502
  • Docs improvements by @gbj in #505
  • fix: <For/> in todomvc example 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_dom and 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() from redirect in Actix integration by @gbj in #514
  • version: 0.2.0-alpha by @gbj in #515

New Contributors

Full Changelog: v0.1.3...v0.2.0

Don't miss a new leptos release

NewReleases is sending notifications on new releases.