svrcekmichal / redux-axios-middleware

Redux middleware for fetching data with axios HTTP client
MIT License
922 stars 96 forks source link

What about Typescript? How I can get typed action in component? #115

Open nnslvp opened 4 years ago

nnslvp commented 4 years ago

How can I get typed action in component? When I try call .then() for action I get TS error Property 'then' does not exist on type but code worked.

flo5324 commented 3 years ago

Hi Personally, I use AnyAction from redux as a workaround

I hope a real type will be created for the actions but it's quite tricky as it must be an object and a promise at the same time Not sure if it's even possible

ThijmenDam commented 1 year ago

Any updates on this? Currently struggling with the same issue.