Hi guys, my name is Okikiola. I am a mobile engineer, and I specialize in React Native. Sometimes, I also play around with SwiftUI.
Why connect with me ? ๐
Flighty for iOS 27 is here
๐๏ธ Refined Dynamic Island
๐ซ New flight progress arc
๐ฑ Support for all new sizes
๐จ New app icons
โจ๏ธ "Ask Flighty" with Siri AI
Flying's most useful Dynamic Island. Now even better.
Get: https://t.co/N1Fh9U3TnU
I've wanted this API for years. Turns out that's what agents want too ๐ค
Expo Modules 2.0 ๐
โ a module is just an annotated Swift class
โ agents write it with almost nothing in context
โ up to 14.5ร faster calls than SDK 55
Early look, iOS first ๐
https://t.co/7folmW5LcM
New skill: /animate-expo
All the animation knowledge, but for your native apps.
React Native and Expo: gestures, sheets, haptics, screen transitions, and more.
Made in collaboration with the @expo team.
https://t.co/zEnLEjkvIp
Tip for today: if you want to know exactly when ๐๐๐ฑ๐๐๐๐ or ๐๐๐ต๐๐๐๐๐๐ฃ๐ fire, just drag the circle and watch the callback chain light in real time ๐
I really love the idea of bringing fully-fledged Web Workers API to React Native - it's something we wanted to add in Worklets for a long time, but it's lot more complicated to do right than we anticipated initially. We keep finding more stuff we have to implement first, before we can do workers.
Due to that, I have to debunk some claims in the comparison.
1. ๐ Worklets also allow you to spawn as many JS environments as you'd like - all of them have an event loop, timers etc. from the start. In Bundle Mode you can also import on them any library you'd want. You can even customize them further, for example react-native-audio-api(-worklets) creates a Worklet Runtime for processing without an event loop and a thread/queue, since they provide these themselves https://t.co/mGulkeUYYW
2.โUnfortunately that's not true. You can use *some* of the Native Modules without issues, but even these might now work as you'd expect. Native Modules in React Native are closely tied to the main React Native runtime (RN Runtime). For example, all events from the modules are sent to the RN Runtime. react-native-workers then forward these events to its own worker runtimes, copying the payloads etc.
It means that even if you sent a HTTP request from a worker, the response comes to the RN Runtime, which runs on the JS thread. If the JS thread is busy, then your worker is starved too.
Also Native Modules usually aren't thread safe - they often assume that they're always called from the RN Runtime and the JS thread.
This is why in Worklets we had to implement fetch from scratch - currently it's gated behind a feature flag https://t.co/5MbUofnlzL. It runs truly off the JS thread and would never get bottlenecked.
3.โ Here I must agree. We know Worklets aren't beginner friendly and we continue to make the API more approachable and intuitive.
4.๐I think it's a bit more complicated. If you send a worklet to be executed on a dedicated Worklets Runtime runtime it's effectively a Web Worker - just without the onMessage API etc.
5.โ That makes sense - Worklets are supposed to be an imperative, low-level building block to make all kind of solutions. Web Workers are a higher-level abstraction.
6.๐Worklets allow you to do the threading as you'd like. You can create a Worklet Runtime and juggle it between threads as you'd like with the C++ API. This is what Reanimated has been doing for years with the UI Worklet Runtime.
7.โ Debuggability out-of-the box is impressive. We have been trying to add debugger support to Worklets for a long time, but it was very difficult pre-Bundle Mode - and also due to how fast the RN Dev Tools have changed recently. Now that the dust has settled we're definitely going to revise this issue.
Let me add a few more points to the comparison in favor of react-native-workers (so I wouldn't look too salty ๐)
8.๐Bundle size loaded onto the Workers.
With Bundle Mode we load the entire JS Bundle onto each extra runtime - this comes at little cost, since it's mmaped in production - but it uses a lot of memory in development. We want to explore some bundle splitting techniques to improve the DX here - Workers nailed it.
9.๐No-copy memory sharing.
Worklets are still missing good no-copy memory abstractions - we've been working to make ArrayBuffers transferable without copies. We came into some threading and GC issues with Hermes when designing the imperative API and decided to postpone the idea. I haven't looked deeply into the code of Workers, but if Ammar got that feature right, huge respect for him.
---
After giving it some thought, I think there's no need to compete here.
I think react-native-worklets ๐ท and react-native-worklets ๐งตcould work integrate on a deeper level and both benefit. Worklets can provide battle-tested, low-level abstractions and Workers deliver a high-level, familiar end-user API ๐ท๐ค๐ค๐งต
Liquid Glass has landed on Cosmos iOS.
The bottom navigation is always shapeshifting, so it felt like the perfect place to introduce it.
Currently experimenting with more ways to integrate glass into @thecosmos universe. Maybe even a little drip from the Dynamic Island.. ๐
New X Android app: 100% Kotlin.
X Chat: Kotlin Multiplatform across Android, iOS, and Web.
E2E encryption, storage, sync, business logic: written once, shipped everywhere ๐
๐ฌ Which logic would you never want to write three times?
Reanimated, Worklets and Hermes V1 had an issue with high memory consumption.
I've written a blogpost that explains the issue and how you can avoid it. tl;dr - Bundle Mode will help you
https://t.co/0BWT3k9Bky
Huge shout-out to the Hermes team, especially Aakash, for addressing the issue promptly on their side!
React Native Screens 4.26.0 has just landed:
โ๏ธ Tabs API is now stable
โ๏ธ Improved FormSheet animations and keyboard interactions on Android
โ๏ธ Fixed touch handling for Pressables in transparent headers on iOS
โ๏ธ Added the bottomAccessoryHidden prop to hide the bottom accessory
โ๏ธ Experimental: a standalone FormSheet component for Android and iOS, menu API for new Native Stack, ScrollViewMarker integration with Tabs
Check the changelog: https://t.co/If0n4wzvlL