We'll also need to implement basic router functionality as petite-vue doesn't have it. At its core, this just means making the hash reactive. This ought to work:
init() {
// Set initial hash value from URL
this.hash = window.location.hash || '#home';
// Listen for hash changes
window.addEventListener('hashchange', () => {
this.hash = window.location.hash;
});
},
The time has come:
https://github.com/bopjesvla/hitch/compare/master...leon-wbr:hitch:master
We'll also need to implement basic router functionality as petite-vue doesn't have it. At its core, this just means making the hash reactive. This ought to work: