DEV Community

Discussion on: WebAssembly with Rust and React (Using create-react-app)

Collapse
 
lokesh007 profile image
Lokesh Prabakaran

Thank you for your feedback.

If you want to use a different path, then please try changing this configs accordingly

  1. Line 17 in this file: github.com/lokesh-007/wasm-react-r...
  2. Line 18 and 20 in this file github.com/lokesh-007/wasm-react-r...

Is there any reason why you don't want to move the rust code inside src folder?

Collapse
 
chasahodge profile image
Charles Hodge • Edited

From the article I wasn't sure where the rust code should be put. I ended up rebuilding my Mac because I wasn't able to compile any wasm rust react tutorial and now things work. Thanks for your efforts and response.

Collapse
 
chasahodge profile image
Charles Hodge

Now that I have things working(?) I don't get the greeting alert, just the default react screen. Are there other steps that have to be implemented to get the alert? Also I noticed a difference in the structure of your solution and the one used in the wasm-game-of-life tutorial. There they place the Rust code in the root of the app and the React app inside that. can you explain why your approach is different and the advantage of your approach. Thank you so very much for your time.