DEV Community

Discussion on: 10 Reasons Why I Recommend Svelte To Every New Web Developer

Collapse
 
urielbitton profile image
Uriel Bitton • Edited

I've been contemplating for months now to start learning svelte or not, to give it a chance or not. And the things that are holding me back the most are:

  1. Context API - does svelte offer a similar solution to manage state across the app, i CANNOT live without the context api its insanely useful.
  2. Inline html conditional rendering - i like this, saves a lot of code
  3. CSS-in-JS does svelte let you use it?

(I've been using react for 2.5 years now, its very hard to go to anything else lol)

Collapse
 
tvanc profile image
Travis Van Couvering

Svelte has a context API but tbh I don't find myself using it very often. YMMV.

svelte.dev/docs#setContext

Collapse
 
mhatvan profile image
Markus Hatvan

1) I described state management as 4th point, you can find some more involved examples online but its super simple to use!
3) Have never used CSS-in-JS but this should answer your question: svelte.dev/blog/svelte-css-in-js