Published
Edited
May 18, 2020
1 star
Insert cell
Insert cell
{
const btn = DOM.element('button');
btn.innerHTML = 'increment';
btn.addEventListener("click", () => {
store.commit('increment');
});
return btn;
}
Insert cell
store = {
Vue.use(Vuex);
const initState = { count: 0 };
const mutations = {
increment(state) {
state.count++;
}
};
return new Vuex.Store({ state: initState, mutations, plugins: [notiState] });
}
Insert cell
notiState = store => {
store.subscribe((mm, _state) => {
mutable state = _state;
});
}
Insert cell
mutable state = {
}
Insert cell
Insert cell
import { button } from '@jashkenas/inputs'
Insert cell
Vue = require('vue')
Insert cell
Vuex = require('vuex@3.4.0/dist/vuex.js')
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more