TOSIT-IO / tdp-ui

Graphical interface for tdp-server
Apache License 2.0
3 stars 2 forks source link

RTK Query integration #201

Closed sergkudinov closed 1 year ago

sergkudinov commented 1 year ago

Which issue(s) this PR fixes

Fixes #173

Additional comments

This is just a beginning with:

Usage:

To generate RTK Query endpoints run:

npm run generate-rtk-query

It creates/overrides the ./src/services/tdpApi.ts file.

Agreements

sergkudinov commented 1 year ago

@PaulFarault

If we validate this solution, I can continue refactoring. This will optimize the code base a lot, because RTK Query does many things under the hood that you do manually with Redux.

It will also require moving the storage of user session to Redux state. Because, user access_token is required here, and there is no another proper way to pass it over there.

sergkudinov commented 1 year ago

This PR is replaced by #202