V
V
Vika Marmeladka2022-02-15 18:45:38
redux
Vika Marmeladka, 2022-02-15 18:45:38

How to extend baseUrl usage in RTK Query?

I have implemented methods to the backend in this way (screenshot), the problem is that the length of these methods will be even longer. I want to use RTK Query. I know that RTK Query has such a thing as injectEndpoints. Due to which I will separate all these methods into files. I still have to write the full names of these methods in the query field for each endpoint, because the baseQuery with its baseUrl is only regulated in one place, that is, at the createApi stage. The question is how to extend the use of baseUrl or better integrate these methods with RTK Query

620bc9867c2bf917816629.png

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question