PacktPublishing / Web-Development-with-Blazor-Third-Edition

Web Development with Blazor, Third Edition
MIT License
17 stars 13 forks source link

Chapter 10: WASM samples not working (book and code differences) #16

Open ClimberBear opened 1 month ago

ClimberBear commented 1 month ago

I'm trying to execute the samples for JS interoperability.

I'm having a lot of problems.

a) I miss the @rendermode InteractiveWebAssemblyin the book (is in the github code only) b) The file Chapter10/MyBlog/SharedComponents/Demo/JSInteropSamplesWasm/JSToStaticNET.razor has the code pointing to sample in await JSHost.ImportAsync("nettojs", "../JSInteropSamples/NetToJS.razor.js");but, on the other hand the file NetToJS.razor.js exist in the correct folder JSInteropSamplesWasm/NetToJS.razor.js

Still fighting to get this working in my installation. It's possible new issues arise.

EngstromJimmy commented 1 month ago

Those are samples for reference not "follow along"-instructions. Since we don't use it in our project, so there might be missing steps.

Not sure what you mean with b?

ClimberBear commented 1 month ago

The b) is a problem of cut&paste. You duplicated the folder, and forgot to modify the javascript called. It worked because the second one call the first one javascript, and is the same code.