Svelte 5 for ReactJS Users

Disclaimer: I didn’t learn Svelte before v5, so this is an experience report on translating Svelte 4 code to 5. This is a blind jump into Svelte. The Basics Svelte components end in .svelte like .jsx or .tsx. They look more HTML-like than JavaScript. In comparison, ReactJS is more JavaScript-like than HTML. <script> let { name } = $props(); </script> <h1>Hello, {name}!</h1> Typescript To use TypeScript, add lang=”ts” to the script tag: ...

September 23, 2024 · 3 min

Toml Crash Course

Background Since migrating this site to Hugo, I felt like it was finally time to avoid learning TOML. This assumes you don’t know TOML but know other data formats? Time to speedrun through. The 30-second Start You can think of toml as key value file format with namespace prefixes that translate to JSON: # this is a comment key = "value" [my-key-prefix] key2 = "value2" person.name = "John" Conceptually produces { "key": "value", "my-key-prefix": { "key2": "value2" }, "person": { "name": "John" } } Dot-notation indicates a nested object. In the spec, TOML calls objects tables. ...

September 19, 2024 · 2 min