Leptos 16: Interlude – Reactivity and Functions

Leptos 16: Interlude - Reactivity and Functions

Interlude: Reactivity and Functions One of our core contributors recently told me, “I didn’t use closures so frequently until I started using Leptos.” This is indeed true. Closures are at the heart of any Leptos application. Sometimes it seems a bit silly: // A signal holds a value and can be updatedlet (count, set_count) = … Read more

Testing Components in the Rust Frontend Framework Leptos

Testing Components in the Rust Frontend Framework Leptos

Testing Components Testing user interfaces can be relatively tricky, but it is indeed very important. This article will discuss several principles and methods for testing Leptos applications. 1. Use Regular Rust Tests to Test Business Logic In many cases, it is reasonable to extract logic from components and test it separately. For some simple components, … Read more

Leptos 13: View Builder Syntax Without Macros

Leptos 13: View Builder Syntax Without Macros

View Builder Syntax Without Macros If you are completely satisfied with the <span>view!</span> macro syntax described earlier, you can skip this chapter. The builder syntax described in this section is always available but is never mandatory. For various reasons, many developers prefer to avoid using macros. Perhaps you dislike the limited <span>rustfmt</span> support (though you … Read more