Comment

Comment by izietto

Because browsers don't support server-side declarative views natively yet. FE development wouldn't even be a thing if web servers could respond with something like

    <script>
      const [count, setCount] = useState(0);
    </script>

    <template id="counter">
      <div>
        <p>You clicked {count} times</p>
        <button onClick={() => setCount(count + 1)}>
          Click me
        </button>
      </div>
    </template>

    <counter></counter>
parent izietto 3 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton