Adivce on using the sdk or api is better for my needs

Hi,

I am looking for some advice and tips whether my usecase is better to use the SDK or API for my React Application.

Without going into full details, my company creates React based applications for our kiosks. Lately, I have been investigating into CMS systems such as Directus, which is the best and my favorite so far.
Our React App Kiosks are offline first built, however that brings issues with integrating a CMS system.

That being said, does the SDK offer anything special when it comes to offline compatibilty and persistance? Or should i simply stick to using the API method and create persistance and methods myself?

Thank you!

Hi :waving_hand: - welcome to the community Emmet!

The SDK is a wrapper around the API that aims to provide convenience and a better developer experience. But you’re not required to use it by any means.

Obviously (being a core team member) I have a lot of Directus projects and the SDK let’s me standardize my data fetching across different frameworks or client side / server side. So consistency is the big draw for me personally.

You can customize the SDK by passing your own fetch implementation or setting up custom storage for auth-related data like refresh tokens, session cookies etc.

If you haven’t already check out the guide here.