Hi @dwicao,
your solution is good, I use a very similar one for my RN projects. The difference from my solution is that I use roundToNearestPixel RN method that rounds a layout size (dp) to the nearest layout size that corresponds to an integer number of pixels. I am thinking to create a npm package of my own or to offer my insights to an existing one.
Are actively maintaining this package? In this case maybe I could offer a PR?
Thanks