JavaScript time passed string from date

Want to have time strings like "n seconds ago" or "m months ago"? Here's a short script. export function friendlyTimePassed(targetDate) { let timeDifferenceMilliseconds = new Date().getTime()-targetDate.getTime(); const ms = 1000; const min = 60 * ms; const hrs = 60 * min; const…

1 min read

React Native Asset Sizes in Android and iOS

Gosh ... everytime I need an asset during conversion of my Android App into react native I have to google for the appropriate size in Android to cover the pixel densities in any device I want to support. This has now an end ... more for me than for others take this: AndroidresolutioniOSmdpi (Baseli…

1 min read
clear cache

React Native clear cache

Often it has been posted in different places but everybody is using different techniques and so am I. Therefore, here's my snippet of clearing the "React Native" cache which is basically a drop of all temp dir's combined with a npm cache clear. This is working on my MBP with MacOS Mojave. PS: I f…

1 min read