[HN Gopher] Leptos, a cutting-edge full-stack Rust framework
       ___________________________________________________________________
        
       Leptos, a cutting-edge full-stack Rust framework
        
       Author : JadedBlueEyes
       Score  : 25 points
       Date   : 2023-06-24 18:58 UTC (4 hours ago)
        
 (HTM) web link (leptos.dev)
 (TXT) w3m dump (leptos.dev)
        
       | chromatin wrote:
       | I'm currently reading up on Leptos and what looks like its major
       | contender, Dioxus [1] in planning for next project.
       | (acknowledging here that Yew [2] is maybe the OG Rust full stack
       | / frontend framework, but I'm not considering it at this time)
       | 
       | Here's a nice comparison of the Rust frontend frameworks:
       | https://github.com/flosse/rust-web-framework-comparison#fron...
       | 
       | Note that Leptos is interesting because it _does not use a
       | virtual DOM_, unlike Yew and Dioxus which are React-like.
       | 
       | We already write our backend in Rust; why not use it for the
       | whole stack and stop worrying about e.g. the Typescript object
       | falling out of sync with the API struct?
       | 
       | [1] https://github.com/DioxusLabs/dioxus/ [2] https://yew.rs/
        
       | opheliate wrote:
       | The author of Leptos has some great YouTube videos talking about
       | Rust for the front-end, especially the performance aspect:
       | https://youtube.com/@gbjxc
        
       | seniorsassycat wrote:
       | This looks very nice
       | 
       | Why use React style capitalized names for components, like App
       | instead of app? It's a bummer when framework breaks a languages
       | style conventions.
       | 
       | I'm confused by 'derived signals'. How is a derived signal
       | different than a signal?
       | 
       | > Using a derived signal like this means that the calculation
       | runs once per signal change per place we access double_count
       | 
       | https://leptos-rs.github.io/leptos/view/02_dynamic_attribute...
        
         | spoiler wrote:
         | I think that the idea (before they add the memoization that the
         | docs mention) is that this only serves as a way to name a
         | computation, so you don't have to litter the same logic in
         | multiple places but can instead just call the lambda instead
         | 
         | Edit to add:
         | 
         | > Why use React style capitalized names for components, like
         | App instead of app? It's a bummer when framework breaks a
         | languages style conventions.
         | 
         | I understand the remark, but on the other hand I also don't
         | mind it; even like what they've done. I think it's useful as a
         | signal that this this is component code, and has the added
         | benefit that it looks familiar to other frontend code
        
           | seniorsassycat wrote:
           | > only serves as a way to name a computation
           | 
           | that is what a rust closure assigned to a variable does
           | right. Why does a derived signal need a new name?
        
       | 1MachineElf wrote:
       | Is it just me, or is that page loading much quicker compared to
       | others?
        
         | RicoElectrico wrote:
         | The funny thing is that I can't Ctrl+U on Firefox due to a
         | character encoding error.
        
         | photonbucket wrote:
         | It seemed very fast to me
        
       ___________________________________________________________________
       (page generated 2023-06-24 23:02 UTC)