---
title: "Discussion on \"3 reasons you should try Svelte\" | Hashnode"
description: "Discussion on \"3 reasons you should try Svelte\". Svelte a new contender to the war of JavaScript frameworks. It might not be as mature as other frameworks like React and Vue, but here are three reasons you should try Svelte:\n\nThe learning curve is pretty small\nIt requires less amount of lines & has..."
url: "https://hashnode.com/posts/3-reasons-you-should-try-svelte/5f6b5e26ff06f53c8bd635bc"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [3 reasons you should try Svelte](https://ameencodes.hashnode.dev/3-reasons-you-should-try-svelte?utm_source=hashnode&utm_medium=feed)

Svelte a new contender to the war of JavaScript frameworks. It might not be as mature as other frameworks like React and Vue, but here are three reasons you should try Svelte: The learning curve is pretty small It requires less amount of lines & has...

Sep 23, 2020 · 3 min read · ameencodes.hashnode.dev  
Read the article

## Written by

[Ameen](https://hashnode.com/@Coder_Crafter)

@Coder\_Crafter

  
[View profile](https://hashnode.com/@Coder_Crafter)

Front End Web Developer

18 yo trying to make sense of this crazy world. I love playing around with Svelte and different APIs . Going through #100daysofcode

## Responses 4

Markdown supported · ⌘↵ to post

[René Monroy](https://hashnode.com/@rene)

[Sep 23, 2020](https://hashnode.com/posts/3-reasons-you-should-try-svelte/5f6b5e26ff06f53c8bd635bc/comment/5f6b91a861f6923cac7c04b3)

I like Svelte but that code comparison is kinda staged. A fair one would use hooks on React, also would properly clear the interval in Svelte too and used the component created inside other component as well.

For React can be done this way (and clearing the interval):

```
function Timer() {
  const [seconds, setSeconds] = useState(0);

  useEffect(() => {
    const interval = setInterval(() => {
      setSeconds(seconds + 1);
    }, 1000);
    return () => clearInterval(interval);
  });

  return <span>Seconds: {seconds}</span>;
}
```

Either way, Svelte is really nice and I'd recommend it every day.

[Ameen](https://hashnode.com/@Coder_Crafter)

[Sep 23, 2020](https://hashnode.com/posts/3-reasons-you-should-try-svelte/5f6b5e26ff06f53c8bd635bc/comment/5f6b91a861f6923cac7c04b3#reply-5f6bb3c7136a1642fa93ac8b)

Sorry used the example on React's official site , will keep this in mind. Thanks for informing 🙂

[Pratham Prasoon](https://hashnode.com/@PrasoonPratham)

[Sep 23, 2020](https://hashnode.com/posts/3-reasons-you-should-try-svelte/5f6b5e26ff06f53c8bd635bc/comment/5f6b64ac61f6923cac7c01dd)

Well written Ameen!

[Ameen](https://hashnode.com/@Coder_Crafter)

[Sep 23, 2020](https://hashnode.com/posts/3-reasons-you-should-try-svelte/5f6b5e26ff06f53c8bd635bc/comment/5f6b64ac61f6923cac7c01dd#reply-5f6b658361f6923cac7c01e9)

Thanks Pratham

[Shad Mirza](https://hashnode.com/@iamshadmirza)

[Sep 23, 2020](https://hashnode.com/posts/3-reasons-you-should-try-svelte/5f6b5e26ff06f53c8bd635bc/comment/5f6b6332ff06f53c8bd63614)

Great read. It has everything I expected to see when I opened the article. Very well written [Ameen](https://hashnode.com/@Coder_Crafter)  
Keep up the good work.

[Ameen](https://hashnode.com/@Coder_Crafter)

[Sep 23, 2020](https://hashnode.com/posts/3-reasons-you-should-try-svelte/5f6b5e26ff06f53c8bd635bc/comment/5f6b6332ff06f53c8bd63614#reply-5f6b65ecff06f53c8bd63636)

Thanks man, wouldn't be possible without your tips.
