withService usage every time needs to specify services although I want just to use actions not any service.
jalalh14 opened this issue · 2 comments
jalalh14 commented
hi,
I had a problem,
when I want to use withService only with actions, it also needs services even it is empty and I have no services and if I dont specify that it will not working and component will not be rendered.
like below:
withService({
services: {},
actions: {
changeState: app.services.complaint.changeState
}
})(MyComponent)
Please check it.
thanks.
ahadrt commented
when need action only. no need use withService. use directly promise based Server.controller(..
class
do
app.services.x(params)
.then(a=>...some code);
instead of
don't do
withService({
actions:{
x:app.services.x
}
}
ahadrt commented
if any other question will happy to help you