The-Commit-Company / frappe-react-sdk

React hooks for Frappe
https://frappe-react.vercel.app
MIT License
107 stars 36 forks source link

Can we use redux toolkit / redux toolkit query with sdk ? #42

Closed SameedHasan closed 11 months ago

SameedHasan commented 11 months ago

I just wanted to know if we can use RTK/RTK Query with frappe react sdk instead of contexts in large scale applications ?

nikkothari22 commented 11 months ago

The SDK uses useSWR internally, which handles the caching and revalidation.

I haven't used RTK Query but I don't think you can use it with this SDK. If you want to build a library that uses RTK, you can do that by using Frappe-JS-SDK.

Also not sure what you mean by contexts? We only use context to share data that will not change throughout the app (server URL etc)