September 2018
Intermediate to advanced
328 pages
9h 10m
English
We will use JavaScript's class syntax to create a wrapper that encapsulates the Wasm interaction functions. This allows us to make changes to the C code quickly without having to search through the entire application to find where Wasm functions are being called. If you rename a method in the C file, you only need to rename it one place. Create a new file in the /src/store folder named WasmTransactions.js and populate it with the following contents:
import initializeWasm from './initializeWasm.js';/** * Class used to wrap the functionality from the Wasm module (rather * than access it directly from the Vue components or store). * @class */export default class WasmTransactions { constructor() { ...Read now
Unlock full access