top | item 37301422

(no title)

bykhun | 2 years ago

I wonder if we can reliably expect React-in-Rust framework that compiles to wasm instead of js? Or maybe just a React library written in Rust, but you can still write the source code in javascript?

Or maybe at least Typescript-to-WASM compiler to skip JS output?

discuss

order

capableweb|2 years ago

I mean probably, yeah, but why? You'd still need JS to involve the DOM with anything, and that's the performance expensive stuff, so might as well just do the whole thing in JS.

patmorgan23|2 years ago

Isn't there work on letting WASM call the DOM/Browser API's directly without having to go through JavaScript?

csjh|2 years ago

I doubt the gains from React rewritten in Rust would be significant; the expensive code is the stuff you write in components

Also Typescript -> WASM exists in some form through assemblyscript

Havoc|2 years ago

Seems a bit silly injecting all that garbage collected untyped stuff straight back into a context where one of the aims was to get rid of it

TheRealPomax|2 years ago

At that point, why even bother with React? Just write a real user interface.

yazaddaruvala|2 years ago

React-likes (including Vue, Preact, etc) have the most ergonomic interface for UX devs to develop with.

_navierstokes|2 years ago

What do you define as a "real" user interface?