React Native

React Native, Mac M1 - SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable

At times, you might believe that the ANDROID_HOME value has been correctly set up in the system environment, yet you encounter an error during the build process. To resolve this issue, simply adjust the environment value in the eas.json file, which is incorporated during the build execution. This should rectify the problem.

ReactJs - Using single state object to handle multiple fields of form

Sometimes you may have seen reactjs form component code where a separate state variable is assigned to separate form fields and a separate onChange handler for each form field. There is no harm in this method, but it creates some extra code in your file which could create a future problem in managing the project.

React Native - Using React Navigation

In the Mobile app, we need to navigate between different screens, and each platform has its way of implementation. But in react native, we use the same code base for building a mobile app for all platforms. 

Fortunately, you don't need to write the platform-specific code for creating navigation; it has already been done by someone. We have react-navigation library, which creates navigation for us and handles underlying platform complexities.

Here is a simple example.

Detail Component