Skip to main content

SlashLogs

Category: React Native

How to inject authorization header on all axios requests

While using a frontend client like React you often find yourself calling the backend and using the same code to give axios a JsonWebToken or an Api Key to authorize the client and fulfill the request in the backend code. Instead of passing the authorization token you can handle and instruct axios to save you from that boilerplate code. Axios is a very usefull http client library that can make a lot for us.

How to change Android package name in a React Native App

In Android the package name is an identifier of your app. In an android device every app should have an identifier for that app and that identifier is the package name. That's true to publish your app in Google's Play Store as well, just like any' android published app store. Just like in a java package the convention is your domain name in reverse, like : com.slashlogs.myawesomeapp. In this tutorial we gonna learn how to set up that package name for our app in React Native.