Sunday, March 3, 2019

At JavaScript MN on Wednesday night, I saw Mike Emo speak on React Native!

React Native (rn) is not an Expo app. An Expo app is a React application running in a browser without controls that looks like a native application, exactly the same trick Capacitor uses in an Ionic 4 application. So if React Native is not running in a browser, how can JavaScript possibility be running at your phone? JavaScriptCore (JSC) is an engine running at both Android and iPhone devices. This engine is used instead of a browser and in its approach a JavaScript thread running in a loop at its main thread can kick off other things. This is, to my understanding, the same trick that lets Node run as a server. Anyhow, the JSC thread can communicate with threads of native code at both Android and iPhone devices and these in turn can instantiate some UI elements. Having said that it probably won't surprise you to learn that Mike Emo suggests that React Native is buggy. He suggests that it is less painful to spin up two separate Cocoa/Objective-C and Java code bases to accommodate iPhone and Android respectively independently than it is to author in React Native. The debugger on a particular Android app is of a different engine. It's not the JSC and that leaves you working blind in some cases. You use XCode to work on React Native on a Mac and you deploy to Google Store or wherever. CRNA (Create React Native App) is perhaps pronounced "cree-nuh" and is a command line tool. HockeyApp seems to be a deployment tool. "React Navigation" is apparently a pretty good component for routing in any React application. There are a lot of pseudo HTML tags which start out with <View in React Native apps. The marquee HTML tag was mentioned by someone before the meeting got rolling. It is a tag for a horizontally scrolling stock ticker effect. I mention the marquee tag because there was more at this event than just Mike. There were three lightning talks. In one of them Shalanah Dawson showed off three different user interfaces she had built. A guy who called himself just "Lemon" had a lightning talk on progressive web apps suggesting that all PWAs have an HTTPS connection, a manifest.json, and a service-worker.js. He likes Let's Encrypt as an eighty-dollar-a-year SSL (secure socket layer) service. PWABuilder by Microsoft was suggested to be the easiest way to get started. Give it a URL and it will create a manifest.json and a service-worker.js for you. Service Workies is another tool. serviceworke.rs by Mozilla has recipes on things like how to Web Push and staggered caching. PWA Fire was online helper number four. A guy named Simon (perhaps a Simon Kinsler???) gave a lightning talk on https://webtask.io/make which will allow you to make simple web sites with up to five hundred kilobytes of hosting for simple text for free at its storage API. In the photo here Simon is in the center with Lemon at the left and Brandon Johnson, the moderator who seems to be head of state of JavaScript MN, at the right.

No comments:

Post a Comment