maraf / dotnet-wasm-react Goto Github PK
View Code? Open in Web Editor NEW.NET on WASM inside a react component
License: MIT License
.NET on WASM inside a react component
License: MIT License
Congratulations on successfully implementing .NET WebAssembly (Wasm) with React! I'd like to express my appreciation for your accomplishment. I'm also interested in achieving the same integration with Angular. Can you provide guidance on how to do it and whether it is supported?
While attempting to implement .NET WebAssembly (Wasm) in Angular, I encountered an npm package compilation error during the application build. After making some configuration changes, I was able to resolve the issue and the wasm part is now functioning correctly (able to call the .NET assembly and print messages in the console). However, I'm facing an issue where the Angular component is not being rendered as expected.
As reported in #4.
/***/ "../qrlibrary/react/dist/index.webpack.js":
/*!************************************************!*\
!*** ../qrlibrary/react/dist/index.webpack.js ***!
\************************************************/
/***/ ((module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "QrImage": () => (/* binding */ __webpack_exports__QrImage)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "../qrlibrary/react/node_modules/react/index.js");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* provided dependency */ var __react_refresh_utils__ = __webpack_require__(/*! ./node_modules/@pmmmwh/react-refresh-webpack-plugin/lib/runtime/RefreshUtils.js */ "./node_modules/@pmmmwh/react-refresh-webpack-plugin/lib/runtime/RefreshUtils.js");
__nested_webpack_require_3181__.$Refresh$.runtime = __webpack_require__(/*! ./node_modules/react-refresh/runtime.js */ "./node_modules/react-refresh/runtime.js");
The last line of code produces the error. The problem is the __nested_webpack_require_3181__
, the "normal" __webpack_require__
has $Refresh$
configured correctly.
Uncaught TypeError: Cannot read properties of undefined (reading 'createElement')
return /#PURE/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement("i", null, "Loading...");
Using npm start.
Change tag or remove not resolve.
I would like to thank you for this example which really looks intersting and exiting. But I struggle a bit how to build it locally.
Could you please just add some instructions into the readme file, what I need to do in order to build and run it locally?
Thanks ๐
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.