A deep dive into Metro internals and the React Native iOS codebase 🐬

Photo by Justin Veenema on Unsplash

This post is a more detailed explanation of a tweet I did earlier this week:

It involves things that I needed to do to get this experiment to work, mainly:

  • Figuring out how to split react native bundle per screen with Metro
  • Tracking the code path that loads and executes the javascript bundle inside JavascriptCore and replicating it
  • Hooking it up inside a react native app to lazily load the javascript bundle for a screen before navigating to it

Code Splitting using Metro

Metro doesn’t have an out of the…

A practical use case for solving an i18n problem using codegen.macro

Background Photo by Rayi Christian Wicaksono on Unsplash

If you follow Kent C. Dodds or Sunil Pai on Twitter, you may have read tweets every once in a while about babel macros. So did I. But it was only yesterday that I finally understood what the hype is all about. And it is glorious!

So, coming to the problem: I wanted to add some utility to do locale-based number formatting in React Native. Since there is no consistent support for the Internationalization API in React Native, I used a polyfill for it: https://github.com/andyearnshaw/Intl.js. Now, along with the polyfill, I also needed to import all the supporting locale files…

You should read this if…

  1. You want to setup custom redirects or other server configuration for free
  2. You want to get your site on HTTPS but don’t know where to start
  3. You’re overwhelmed with the amount of choices out there (like Netlify, Surge, BitBalloon, Now)

Why Github?

  1. Easy to setup and get started with Github Pages
  2. Instant deploys on pushing new code

Why Cloudflare?

  1. It’s free
  2. It comes with out-of-the-box support for SSL (HTTPS). (Here’s why HTTPS matters.)
  3. Super simple DNS management
  4. Ability to set browser cache expiration for assets
  5. Auto minify your static assets
  6. Custom page rules for setting up redirects, always HTTPS…

Let’s Encrypt is a new Certificate Authority which provides free SSL certificates (up to a certain limit per week). It came out of beta around a month back and is supported by a wide array of browsers.

Certbot is the official Let’s Encrypt client, developed by the Electronic Frontier Foundation. It makes automatically fetching and deploying SSL/TLS certificates for your web server a relatively straight forward process.

Lets get started.

Step #1

Make sure that you have opened up ports 80 (HTTP) and 443 (HTTPS) in your instance Security Group to public. …

#GrowthHacking my Twitter account for @Crowdfire Twitter Premier League

[Update — October 3, 2017] The followers script was changed to match the new Twitter UI changes

It all started on March 16th, 2015, when @deepak365 decided to hold the @Crowdfire Twitter Premier League, which trended on social media as #CTPL.

Three weekly rounds, three targets, one winner in the end. Simple.

But before I go into the details, let me tell you that I am not a social media guru. I don’t know how to market stuff. I don’t have a sense of humor like @Trendulkar or @GabbbarSingh. To make…

Karan Thakkar

he/him 💖 staff engineer @Transferwise ⚛️ prev: @Skyscanner, @Crowdfire 👨‍💻

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store