Phenomen
Phenomen
TTyphonJS
Created by TyphonJS (Michael) on 10/26/2024 in #typhonjs-runtime
TRL `0.2.0-next.X` Update Marathon
I mean it's trivial to make it work, I just think it's something Svelte compiler should do automatically without boilerplate.
//that's what I use since I also add utility functions like `reset` and `undo` to classes
class Foo {
value = $state('bar')
}

setContext('foo', { foo: new Foo() })
//that's what I use since I also add utility functions like `reset` and `undo` to classes
class Foo {
value = $state('bar')
}

setContext('foo', { foo: new Foo() })
//more straight-forward version with accesors
let foo = $state('bar')

setContext('foo', {
get foo() { return foo },
set foo(value) { foo = value },
})
//more straight-forward version with accesors
let foo = $state('bar')

setContext('foo', {
get foo() { return foo },
set foo(value) { foo = value },
})
19 replies
TTyphonJS
Created by TyphonJS (Michael) on 10/26/2024 in #typhonjs-runtime
TRL `0.2.0-next.X` Update Marathon
There are some things that I really want to see, in particular: 1) async version of $effect i.e $asyncEffect. Using async functions in effects this way is not correct because an async function returns a promise that Svelte doesn’t expect and can’t resolve:
$effect(async () => {
await sleep(1000);
return () => console.log('hello') //will never return
})
$effect(async () => {
await sleep(1000);
return () => console.log('hello') //will never return
})
So you need to either make it thenable
$effect(() => {
sleep(1000).then(() => {
console.log('hello')
})
})
$effect(() => {
sleep(1000).then(() => {
console.log('hello')
})
})
Or use immeadiate function like this:
$effect(() => {
(async () {
await sleep(1000)
console.log('hello')
})()
})
$effect(() => {
(async () {
await sleep(1000)
console.log('hello')
})()
})
2) Partial track on $effect, so it will only trigger on changes I want to track, not every single variable in the function. Currently, it can be achieved with runed/watch 3) Reactive context without classes, getters and setters. Not a big deal but it just counter-intuitive that $state doesn't work in context without boilerplate code.
19 replies
TTyphonJS
Created by TyphonJS (Michael) on 10/26/2024 in #typhonjs-runtime
TRL `0.2.0-next.X` Update Marathon
Svelte 5 still comes across as beta to me with non-stop fixes coming in daily
That's absolutely true, they have the whole Advent of Svelte going on right now with new features announced daily https://svelte.dev/blog/advent-of-svelte
19 replies
TTyphonJS
Created by TyphonJS (Michael) on 10/26/2024 in #typhonjs-runtime
TRL `0.2.0-next.X` Update Marathon
Looking forward to Svelte 5 to start some development with TRL. I migrated all my corporate tools and websites to Svelte 5 last month and it was painful, rewriting 50% of the code to runes with barebones documentation and basically no examples / real world projects. But now that I understand Svelte 5 much better, it feels amazing to use, and I just can't downgrade to Svelte 4 for Foundry dev.
19 replies
VVALORANT
Created by Yakiyo on 6/12/2024 in #community-help
Unable to play valorant without a vpn
It looks like your ISP is blocking Mumbai server. Do this (with Cloudflare WARP disabled): https://support-valorant.riotgames.com/hc/en-us/articles/360047225674-How-to-Use-Tracert-to-Obtain-Network-Logs You will get a file with tracert data. Then submit a support ticket and attach that file to it.
4 replies
TTyphonJS
Created by TyphonJS (Michael) on 9/25/2023 in #typhonjs-runtime
Svelte 5 TJSDocument Prototype
I guess it depends if your goal is to make syntax closer to the original concept or look nicer 😔 Some people who will learn Svelte 5 in the future and come to TJS might get confused by differences
7 replies
TTyphonJS
Created by TyphonJS (Michael) on 9/25/2023 in #typhonjs-runtime
Svelte 5 TJSDocument Prototype
I feel like using $ for getters is against the concept of runes, at least what I've seen from Rich Harris and Huntabyte demos
7 replies