Closed garrettjoecox closed 3 years ago
What build are you using atm? That stuff isn't even released yet, as far as I know.
Note that in the current next
branch, we've split up the exports into separate entry points. rtk-query
has the UI-agnostic versions of createApi
, while rtk-query/react
has the React-specific enhanced versions that actually generate the hooks. Assuming you're using one of the CI-built packages, you probably need to use the React-specific entry point instead.
What build are you using atm? That stuff isn't even released yet, as far as I know.
Note that in the current
next
branch, we've split up the exports into separate entry points.rtk-query
has the UI-agnostic versions ofcreateApi
, whilertk-query/react
has the React-specific enhanced versions that actually generate the hooks. Assuming you're using one of the CI-built packages, you probably need to use the React-specific entry point instead.
@garrettjoecox This is correct. You'll need to import from the react entrypoint :tada:
More specifically:
import { createApi } from '@rtk-incubator/rtk-query/react';
import { fakeBaseQuery } from '@rtk-incubator/rtk-query';
Terrific, this solved my issue.
What build are you using atm?
Using the next
branch, the only way we'll be able to use RTKQ is with these changes so looking forward to them getting released 😄
@garrettjoecox That's awesome! Keep us posted on your experience. We're almost ready to go - just updating the docs and potentially one more small feature will get merged in today.
Hey there, I'm using the newly added
fakeBaseQuery
pattern, as we have an already built SDK we are wanting to wrap RTKQ around.Following the pattern in the fakeBaseQuery tests it doesn't seem the returned value has the auto-generated hooks for the queries added. Is this a design decision, are we stuck with that limitation if we use fakeBaseQuery?