The host in Effect | TypeScript for the AI Era UI is clean enough that standard Html.component views…
@wwwalkerrun4K followers
12,185 views
18 Comments
Comments from the original post on X (Twitter)

@MichaelArnaldi
@EffectTS_ @NativeScript Would love to upstream this! Cc @thefubhy @tim_smart @devinjameson
30 likes

@wwwalkerrun
@NativeScript Source and examples
11 likes

@unwindstack
@EffectTS_ @NativeScript Does focus and tab order work on the mac side
2 likes

@wwwalkerrun
@EffectTS_ @NativeScript it does. you can see how that's wired in the macoshost here:
5 likes

@unwindstack
@EffectTS_ @NativeScript Oh nice, thats usually the first thing that breaks
2 likes

@wwwalkerrun
@EffectTS_ @NativeScript indeed always critical! key reason why I’ve always preferred platform api route first class in TS anything
2 likes

@unwindstack
@EffectTS_ @NativeScript Makes sense, the platform already solved it

@thefubhy
@EffectTS_ @NativeScript Nice! Are you on our Discord?
1 like

@wwwalkerrun
@EffectTS_ @NativeScript i believe so, will ping there

@siebixweb
@EffectTS_ @NativeScript @jonahkalkman

@remusrisnov
@EffectTS_ @NativeScript Does it compile down to the primitives of each platform? Say you write the code in effect UI then point it at native iOS will it convert it into swift?

@wwwalkerrun
@EffectTS_ @NativeScript You could choose either way. Release with any JS engine (V8, quickjs, Hermes, etc) or could compile to swift & kotlin
2 likes

@MichaelArnaldi
@remusrisnov @EffectTS_ @NativeScript How do you compile general purpose JS to Swift ?
2 likes

@wwwalkerrun
perhaps the most interesting question with this. we don't compile arbitrary JS to Swift. we compile closed-world TypeScript with explicit boundaries. - closed-world graph + refuse constructs that truly require a JS VM (eval, with, Proxy) instead of silently diverging - gradual soundness (typed fast path + tiny dynamic kit). only where untyped boundaries appear (any, JSON.parse, Function.dual, dynamic keys) do we drop to a small Swift runtime kit (JSDynamic, JSExpando, JSFunction cells) with explicit null/undefined tracking - given NativeScript already models the entire platform SDKs 1:1 in TypeScript, so UI, layout, and plugins compile straight into direct Swift/Kotlin calls naturally
1 like

@MichaelArnaldi
@remusrisnov @EffectTS_ @NativeScript How does that work with Effect that does use Proxy for example
1 like

@wwwalkerrun
looking through the source, none of the 5 Proxy sites (Data.taggedEnum, Equal.byReference, AtomRef.collection, Layer.mock, cluster/Sharding) are referenced by @effect/ui, @effect/ui-kit, or core Effect runtime (Effect, Fiber, Context, Layer, Stream, Schema, Queue, Subscription), so it shouldn't present any blocker. in rare event usage depended on it, the compiler enforces a strict compile-time refusal for any reachable Proxy, if reached, it stops with a clear [proxy] diagnostic naming the file, line, and why Proxy is excluded, allowing one to opt for different solution.
1 like

@MichaelArnaldi
@remusrisnov @EffectTS_ @NativeScript Schema will most likely start using Proxy more heavily soon
1 like

@remusrisnov
Slightly off topic, but could EffectUI be optimized so that when used in a dom/web environment it could be as fast if not faster than something like SolidJS? Or given that it’s an alpha one should expect performance to improve? Is there any limitations to why performance couldn’t improve in principle?