I've been dabbling of late in building a mobile app with React Native + Expo. One of the things that attracted me most to Expo, is that – on top of the "write once, run on iOS and Android" claim of React Native – Expo claims to also let an app run seamlessly on the web. Anyway, as it turns out (surprise surprise – not!), neither of those claims are particularly aligned with reality. I found this out – with the claim of "run on native and web" – as soon as I wanted to add a simple map to my app.
Behold, a MapLibre map, working both for native and for web, in Expo.
Below is my humble lil' guide to getting MapLibre working for both native and web in Expo. Note: if you want to skip the step-by-step shpiel, and you just want a working example with all the code, feel free to head straight to the Expo MapLibre native + web demo on GitHub.
I was alarmed to recently learn that plenty of folks out there on the interwebz don't believe that the seas have risen, at all, for several centuries. Although, in hindsight, I shouldn't be surprised: after all, there's no shortage of climate change deniers out there, and sea level rise is very (although not completely) interconnected with climate change.
To be fair to those folks, it's true that – as they claim – the water level of various landmarks around the world, such as the Statue of Liberty, Plymouth Rock, and (in my own stomping ground of Sydney Harbour) Fort Denison, has not "visibly" risen since they were erected.
The fact, per the consensus of reputable scientists, is that the global average sea level has risen by 15-25cm (6-10") since 1900. Now, I'm willing to entertain the notion that, alright, for all practical purposes, that's not much. And that's just the average. So I consider it not unreasonable to concede that there are numerous places in the world today, where the sea level has barely, if at all, risen.
The thing is, sea level rise lags behind global warming by several decades. So (if you'll excuse my hitting-rather-close-to-home choice of pun), what we've seen so far is just the tip of the iceberg. We've already locked in another 10-25cm (4-10") of sea level rise between now and 2050. And we're currently looking at a minimum 28-61cm (11-24") of sea level rise between now and 2100, and a minimum 40-95cm (16-38") of sea level rise between now and 2200. And those are the best-case scenarios, based: on the most conservative of scientists' conclusions; and on the world taking drastic action to reduce greenhouse gas emissions starting right now (a depressingly unlikely occurrence).
So, ok, perhaps sea level rise ain't gotten real yet for most people (although it sure has for some people). But I got news for y'all: it's gonna get a whole lot realer.