Porting a vanilla JavaScript library to Svelte 5 - complete guide

  Рет қаралды 1,216

Stanislav Khromov

Stanislav Khromov

Ай бұрын

In this video we'll port the (very cute) JavaScript library Oneko.js from vanilla JS to Svelte 4 and Svelte 5.
Original library: github.com/adryd325/oneko.js
Repo: github.com/khromov/svelte-neko

Пікірлер: 8
@ScriptRaccoon
@ScriptRaccoon Ай бұрын
Nice video! Small remark, at 25:00 a better approach would be to use svelte:document in the markup and add the event listener there. This also works with svelte:window. The advantage is that it is more concise and that Svelte does the cleanup (removing the event listener) for you automatically.
@UwU-dx5hu
@UwU-dx5hu Ай бұрын
installed the chrome extension.its fun
@NicholasMaietta
@NicholasMaietta Ай бұрын
I appreciate this!
@yanisxmine
@yanisxmine Ай бұрын
thank you for showing how it's done in general! you read all the time "svelte is just javascript so you're good". for a newbie like me the question remained - can you show me once how you do it? what are the points to pay attention to while porting? very much appreciate this guide. btw appreciation jar is beautiful - how you designed the flow, your writing, approach to privacy, etc.
@StanislavKhromov
@StanislavKhromov Ай бұрын
Thank you for your thoughtful comment! ☀
@ubermatchvlaad532
@ubermatchvlaad532 Ай бұрын
Why not use svelte directives instead of js document modifiers i.e. `onmousemove={}` 25:26
@StanislavKhromov
@StanislavKhromov Ай бұрын
👋You can definitely use something like instead of the shown approach. Hopefully it's still useful to see how hooking up event listeners and handling the cleanup works.
@iconsumepizza
@iconsumepizza Ай бұрын
ON GOD I DONT KNOW HOW TO SCRIPT
React VS Svelte...10 Examples
8:35
Beyond Fireship
Рет қаралды 519 М.
Svelte 5 Preview | Runes
12:40
ThePrimeTime
Рет қаралды 74 М.
He tried to save his parking spot, instant karma
00:28
Zach King
Рет қаралды 23 МЛН
WHO DO I LOVE MOST?
00:22
dednahype
Рет қаралды 8 МЛН
Svelte 5 is a beast, but is it worth switching?
37:55
Syntax
Рет қаралды 19 М.
5 Things I Wish I Knew When I Started Using SvelteKit
7:27
Ben Davis - Tech
Рет қаралды 9 М.
qwik is the most underrated framework!
14:08
Nev the Dev
Рет қаралды 736
NextJS VS SvelteKit in 2024...
15:51
Ben Davis - Tech
Рет қаралды 10 М.
How To Use The Context Package In Golang?
17:03
Anthony GG
Рет қаралды 52 М.
Crafting Magical Spells Using Svelte's Powerful Reactivity
13:53
Joy of Code
Рет қаралды 10 М.
Svelte 5: Compiler, Signals, and Web App Performance - JSJ 627
1:21:52
The React Interview Questions You need to Know
21:29
CoderOne
Рет қаралды 21 М.
iPhone 12 socket cleaning #fixit
0:30
Tamar DB (mt)
Рет қаралды 31 МЛН
AI от Apple - ОБЪЯСНЯЕМ
24:19
Droider
Рет қаралды 84 М.
Main filter..
0:15
CikoYt
Рет қаралды 3,2 МЛН
Cadiz smart lock official account unlocks the aesthetics of returning home
0:30