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

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more