React Native — How to fade in a parent but not the children

I recently had to make a background fade in and out but the children needed to be visible the whole time. This is a use case that I can see coming up time and time again. Here is what I did to solve it.


At first I thought that I would animate the opacity. But doing this on a parent would cause the children to fade in and out as well. So I had to find another option.

Background Color