September 2018
Intermediate to advanced
328 pages
9h 10m
English
We need an entry point to load our application. Create a file in the /src folder named main.js and populate it with the following contents:
import App from './components/App.js';import { store, initializeStore } from './store/store.js';// This allows us to use the <vue-numeric> component globally:Vue.use(VueNumeric.default);// Create a globally accessible store (without having to pass it down// as props):window.$store = store;// Since we can only pass numbers into a Wasm function, these flags// represent the amount type we're trying to calculate:window.AMOUNT_TYPE = { raw: 1, cooked: 2};// After fetching the transactions and initializing the Wasm module,// render the app.initializeStore() .then(() => {Read now
Unlock full access