This document aims to list some "gotchas" in Android development using React Native, or in other words, common problems that a developer might face during the development of Android views and how to solve it.
Following the React Native documentation, to set a shadow in an element it needs the following properties: shadowColor
, shadowOffset
, shadowOpacity
and shadowRadius
. However, on Android, it needs to use the elevation view style prop from react-native to add shadows, which will also affects the z-index value.
{
// iOS
shadowColor: "#000",