You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have tried this example with both axios and fetch drivers. I can though only get it to work for the fetch-adapter:
// TasksCollection.jsconstapiPath='/api'importadapterfrom'mobx-rest-axios-adapter'import{apiClient,Collection,Model}from'mobx-rest'apiClient(adapter,{ apiPath })classTaskextendsModel{}classTasksextendsCollection{url(){return`/tasks`}model(){returnTask}}exportdefaultnewTasks()// In a Mithril componentimporttasksCollectionfrom"../../mobx/TasksCollection";tasksCollection.fetch({data: {all: true}});
The error I get from this driver is:
TypeError: apiClient(...).get is not a function
at Tasks.Collection.fetch (index.js:885)
at executeAction$$1 (mobx.module.js:660)
at Tasks.res (mobx.module.js:651)
The text was updated successfully, but these errors were encountered:
I have tried this example with both axios and fetch drivers. I can though only get it to work for the fetch-adapter:
The error I get from this driver is:
The text was updated successfully, but these errors were encountered: