Hi everyone, We want to incorporate typesense in ...
# community-help
a
Hi everyone, We want to incorporate typesense in our React Native App. Out of the two options 1. Directly hitting the typesense API from client 2. Having the client hit our API and then call typesense API from our API What is recommended? What could be the pitfalls of using 2? We are considering option 2 so that any changes can be made easily
d
@Aditi Limaye I would also recommend going with the second approach coz, if you find a bug or you want to make some changes to search functionality , you can do it any time and deploy your apis but if you have that client code in frontend you have to create a version and then publishing it to appstore/play store is a tedious process moreover, you can do rate limiting and stuff with the second approach
a
Thank you for the quick response. Do you see any drawbacks of this approach?
k
If you wish to hit Typesense API directly and still want to retain some flexibility, I will suggest treating the Typesense host, API keys etc. as metadata that you load from your own server. This way, you can dynamically change the typesense host used or rotate API keys etc. without modifying your app.