redux-toolkit
redux-toolkit copied to clipboard
RTK Query hook losing type after exporting
We have 2 repos, common contains the RTK query stuff, app uses the query hook exported from common.
with in the common repo, everything is working as expected
However when importing it into the app repo, the type is lost
Unsure what the issue is, both are using "@reduxjs/toolkit": "^1.8.1",
Appreciate any help, thanks!
Huh, weird. Unfortunately I don't think we're going to have any way to investigate this without seeing a repo that demonstrates the problem.
Huh, weird. Unfortunately I don't think we're going to have any way to investigate this without seeing a repo that demonstrates the problem.
let me try to setup a demo repo real quick
Maybe it would be helpful for someone. I've faced the same problem and in my case, it was simply solved by adding
"references": [
{ "path": PATH_TO_MY_COMMON_PACKAGE }
]
to tsconfig.json in the app