cargo leptos 0.4.5
v0.4.5

latest releases: 0.7.0-preview2, 0.7.0-preview, 0.6.11...
14 months ago

I've gotten back into a regular rhythm of patch releases pulling in some of the smaller bugfixes, but haven't had time to write release notes for each one. I should just auto-generate them, I suppose—sorry about that!

Anyway here's a quick summary of the new features included in the past few releases. The full changelog below includes various bugfixes, chores, and updates to the docs as well.

  • Some useful fixes to support for cargo leptos watch --hot-reload
  • leptos_axum::extract_with_state to support extractors that use a State, if it's been provided via context in a custom handler
  • The watch function, which functions as a more configurable create_effect, including the ability to explicitly list dependencies, stop listening to them, whether to run immediately or lazily, etc.
  • Better 404 page support in Actix examples and templates
  • Added support for adding Content-Security-Policy nonces to inline script and style tags with use_nonce and the nonce feature
  • Rewritten <For/> diffing algorithm that both fixes a number of correctness issues/edge cases in <For/> and drops ~10kb from the WASM binary

Basically, a bunch of small but really useful changes, and about a hundred bugfixes.

I also just want to give a shout-out to @agilarity, who's become one of the top contributors to the library through a very helpful focus on CI and testing. If you're ever looking for a great model of how to test a Leptos frontend app, the counters_stable example now features two complete test suites, one in JS using Playwright and one written in Rust using wasm_bindgen_test. This has been a huge amount of very impressive work.

Complete Changelog

  • v0.4.0 by @gbj in #1250
  • chore: remove unused variable warnings with ssr props by @tqwewe in #1244
  • test(counters_stable): add missing e2e tests by @agilarity in #1251
  • docs: update server fn docs by @gbj in #1252
  • test(router_example): add playwright tests by @nomorechokedboy in #1247
  • Add fallback support for workspace in get_config_from_str by @afiqzx in #1249
  • fix: regression in ability to use signals directly in the view in stable by @gbj in #1254
  • fix: hot-reloading view marker line number by @gbj in #1255
  • docs: update 02_getting_started.md by @gbj in #1256
  • example/readme: Link to 'VS Browser' ext; format. by @srid in #1261
  • chore: new cargo fmt by @gbj in #1266
  • feat: implement PartialEq on ServerFnError by @M1cha in #1260
  • Minor: Ran cargo clippy --fix and reviewed changes. by @martinfrances107 in #1259
  • fix: HtmlElement::dyn_classes() when adding classes by @gbj in #1265
  • fix: clearing <For/> that has a previous sibling in release mode (fixes #1258) by @gbj in #1267
  • Added watch by @maccesch in #1262
  • fix: error messages in dyn_classes by @gbj in #1270
  • docs: add docs on responses/redirects and clarification re: Axum State(_) extractors by @gbj in #1272
  • fix: improved diagnostics about non-reactive signal access by @gbj in #1277
  • fix: duplicate text nodes during <For/> hydration (closes #1279) by @gbj in #1281
  • fix: untracked read in <Redirect/> by @gbj in #1280
  • fix: issue with class hydration not removing classes correctly by @gbj in #1287
  • fix: use once_cell::OnceCell rather than std::OnceCell by @gbj in #1288
  • leptos axum extract with state by @sjud in #1275
  • examples: add 404 support in Actix examples (closes #1031) by @gbj in #1291
  • fixed example for error handling by @webmstk in #1292
  • Adding instructions to add a tailwind plugin to examples. by @dessalines in #1293
  • chore: add mdbook in flake by @gbj in #1299
  • test(counters_stable): add wasm testing by @agilarity in #1278
  • fixed typo in parent-child doc by @webmstk in #1300
  • Rework diff functionality for Each component by @g-re-g in #1296
  • docs: must use View by @gbj in #1302
  • docs: fix braces in <Show/> example by @gbj in #1303
  • fix: <ActionForm/> should check origin correctly before doing a full-page refresh by @gbj in #1304
  • feat: use lazy thread local for regex by @tqwewe in #1309
  • test(counters_stable/wasm): enter count by @agilarity in #1307
  • docs: clarify WASM target by @gbj in #1318
  • update warnings to remove mention of csr as a default feature by @Heliozoa in #1313
  • docs: typo by @maheshbansod in #1315
  • docs: typo & punctuation by @maheshbansod in #1316
  • refactor(ci): improve the organization of cargo make tasks by @agilarity in #1320
  • feat(leptos-config): kebab-case via serde's rename_all by @filipdutescu in #1308
  • fix: <ActionForm/> should set value even if redirected by @gbj in #1321
  • feat(config): implement common traits for Env by @filipdutescu in #1324
  • fix: Actix server fn redirect() duplicate Location headers by @gbj in #1326
  • Bump indexmap to version 2 by @g-re-g in #1325
  • fix: warning generated by new #[must_use] on views by @gbj in #1329
  • docs: clarify nightly in "Getting Started" by @gbj in #1330
  • fix: event delegation issue with <input name="host"> by @gbj in #1332
  • feat: allow active_class prop on <A/> by @gbj in #1323
  • fix: routing logic to scroll to top was broken by @gbj in #1335
  • fix: check LEPTOS_OUTPUT_NAME correctly at compile time (closes #1337) by @gbj in #1338
  • fix: un-register <Suspense/> from resource reads when <Suspense/> is unmounted by @gbj in #1342
  • build: run tasks from workpace or member directory by @agilarity in #1339
  • docs: how not to mutate the DOM during rendering by @gbj in #1344
  • fix: server_fn rustls feature shouldn't pull in default-tls by @gbj in #1343
  • Book, don't run rust code snippets and update getting started by @g-re-g in #1346
  • use cfg_attr for conditional derives by @CircuitSacul in #1349
  • docs: improve ServerFnError when a server function is not found by @gbj in #1350
  • docs: don't warn when a resource resolves after its scope has been disposed by @gbj in #1351
  • fix: duplicated meta content during async rendering by @gbj in #1352
  • ci: speed up verification by @agilarity in #1347
  • fix: hydration-key conflicts between <ErrorBoundary/> children and fallback by @gbj in #1354
  • feat: add support for adding CSP nonces by @gbj in #1348
  • docs/warning: fix <ActionForm/> docs and add runtime warning for invalid encodings by @gbj in #1360
  • ci(ci): only run on source change by @agilarity in #1357
  • ci(check-examples): only run on source change by @agilarity in #1356
  • fix: correctly show fallback for Transition on first load even if not hydrating by @gbj in #1362
  • fix: update link to example code in book testing page by @BakerNet in #1365
  • doc: previews to backup CodeSandbox by @jdevries3133 in #1169
  • Hot reload bug-fix by @sebastian in #1368
  • perf: exclude hydration code in CSR mode by @gbj in #1372
  • fix: release lock on stored values during update/set by @gbj in #1373
  • fix: memory leak in leptos_axum by @gbj in #1374

New Contributors

Full Changelog: v0.4.0...v0.4.5

Don't miss a new leptos release

NewReleases is sending notifications on new releases.