News for hackers. Stuff that matters.
Re:React: You Might Not Need an Effect by yencabulator on Friday March 24, 2023 @06:59PM (#35296815)
Svelte is pretty pleasant, compared to React. It's fundamentally a JS-to-JS compiler that adds reactive assignments, and ridiculously much more usable than useEffectHopeThisWasTheRightThing.

    let count = 1;
    
    // this is reactive
    $: doubled = count * 2;
    
    function handleClick() {
      count += 1;
    }

There are no comments on this comment yet.