This changes nothing from the existing API it adds only the option to supply a promise as feathers client i need this feature and think its usefull for any one who does newer coding styles and does things like i do:
frathers-client-async.js
/* global window */
import loader from '@loader';
let clientUrl;
if (window && window.fetch) {
clientUrl = '~/models/feathers/v3/feathers-client.socketio.js';
} else {
clientUrl = '~/models/feathers/v3/feathers-client.rest.js';
}
export const feathersClient = loader.import(clientUrl).then((module)=>{ return module.feathersClient; }, err=>{
new Error('Feathers-client Error '+ clientUrl,err);
});
export default feathersClient;
This changes nothing from the existing API it adds only the option to supply a promise as feathers client i need this feature and think its usefull for any one who does newer coding styles and does things like i do:
frathers-client-async.js
Usage