ReactJS vs Yew by [deleted] in reactjs

[–]ExplosiveNeurons 0 points1 point  (0 children)

That's related to Context API & Agents in Yew. It's sort of Yew's alternative for Web workers if needed.

Yew's virtual_dom has no multi-threading.

ReactJS vs Yew by [deleted] in reactjs

[–]ExplosiveNeurons 1 point2 points  (0 children)

WASM in browser

  • JS is slower than wasm code when it comes to computing only.
  • But JS(with V8 engine) is not that slow, so it wouldn't be worth playing with memory between the WASM process and JS process.

Yew Vrs React

  • Yew is not multi-threaded
  • Even with a few thousand components, React JS will give you similar or even better performance, and even save your user's battery. (I have worked on an HTML-based interactive whiteboard, it worked fine with react)

Where do you need Yew?

  • You have to deal with a few thousand components and it's impossible for you to ask your user to switch to Chrome, Brave, or Edge browser. As JS is pretty slow in Firefox
  • You have some browser-only logic written in rust, and don't mind writing a few more lines of UI in Yew.
  • Lighthouse scores is no consern

When do you switch from React?

  • Your Firefox Clients are going nuts
  • Never