-
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Model inheritance #46
Conversation
Intervals and Tallies aren't always going to be needed, for example. At present, they are, but we intend to allow for the end user to configure this per-todo. Initialise the respective stores on the components which require them or... at first invocation of |
No lifecycle hooks or anything to tap into in terms of triggering an action on initial store invocation. I could do something like... wrap () => {
const store = useMyStore()
store.initStore()
return store
} Or... now that I know the database is certain to be loaded before any store module is called (outside of tests, anyway), maybe I could: // State
const list = ref(new MyCollection() as Collection)
// Actions
function initStore() {
// list.value = new TodoCollection() as Collection
} It should be equivalent. Tests are succeeding when I modify the todos store to behave that way. The |
I've done that for all stores now, and it is working both in tests and in the browser. However... removing |
closes #44