6 ms·
This article mentions inflection points, but doesn’t delve into clientside apps significantly (e.g. SPAs). How far away are we from transitioning from component
by squidsoup 5y ago
This article mentions inflection points, but doesn’t delve into clientside apps significantly (e.g. SPAs). How far away are we from transitioning from component based JavaScript frameworks like react, to something which compiles to wasm?
- nicoburns 5y agoI doubt JavaScript will ever be fully replaced here. JavaScript is a pretty good language for these use cases, and it has a huge ecosystem. But if you want to use a front end framework that compiles to warm then you can do that today. Rust, Go, C# and more all have libraries (only Rust really makes sense though, as the others involve shipping a huge runtime). Just don’t expect it to be any faster than JS.
- hsheth2 5y agoAgree with sibling comment - the JS ecosystem has a huge momentum behind it and probably isn't going away anytime soon. On the web, Wasm has currently found the most success with compute-intensive applications, since the JS <-> Wasm bridge is still pretty expensive. There are already some Wasm-based frameworks like https://platform.uno/ https://platform.uno/ that work on the web, but things like React/React-native and Flutter have a huge head start.
- WA 5y agoReact is for connecting state to the DOM and managing the redraws. I don’t see how Wasm could ever replace React, if you want to deal with UI. It’s a different thing.
- hsheth2 5y agoIf we get to a point where interacting with browser DOM is comparably fast with Wasm, either through JS or with native APIs, then we could see Wasm replace React. That said, you're right that we probably won't see anything of that sort in the short term.
- WA 5y agoBut how? React is a library to implement and structure your architecture in a certain way. Wasm is just a language. Wouldn’t you need a React-like framework in Wasm to get the same benefits? Edit: I guess you mean you’d compile your React app to Wasm, no?
- hsheth2 5y agoYes you’re right - I somewhat conflated two different things. More clearly: once Wasm interactions with the browser are fast, a new framework + Wasm could replace React + JS.