News for hackers. Stuff that matters.
Re:Pay attention to WebAssembly by WA on Tuesday February 01, 2022 @01:07AM (#30159155)
React 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.
Re:Pay attention to WebAssembly by hsheth2 on Tuesday February 01, 2022 @01:22AM (#30159244)
If 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.
Re:Pay attention to WebAssembly by WA on Tuesday February 01, 2022 @01:26AM (#30159266)
But 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?

Re:Pay attention to WebAssembly by hsheth2 on Tuesday February 01, 2022 @01:58AM (#30159434)
Yes 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.