So I've been skimming through some Svelte documentation recently and from what I've been reading it seems to be earning my heart. The ease of use and implementation is all a developer can ask for. This short blog will mostly be about starting and setting up a Svelte application. For this I'll be using VSCode.
"Svelte is a radical new approach to building user interfaces. Whereas traditional frameworks like React and Vue do the bulk of their work in the browser, Svelte shifts that work into a compile step that happens when you build your app.
Instead of using techniques like virtual DOM diffing, Svelte writes code that surgically updates the DOM when the state of your app changes."
- The website
Open VSCode and create the necessary folder where you will be housing your project.
Go into your terminal and cd into that folder that you created.
Run the command
> npx degit sveltejs/template app-name
This will auto generate some files and folders for you. Similar to how React would.
After you run that command it will generate a folder with your app name. Cd into that folder then run
> npm install
This will install all of the necessary dependencies. You should see a package-lock.json appear in your directory.
Lastly, run the command...
> npm run dev
This will start a server running on PORT 5000 (http://localhost:5000). Happy coding!