We recently did a React Native Windows project. While I'm under NDA and can't say what the app is, I do have some general observations about React Native Windows.
This project had to support iOS, Android, and Windows. It primarily was intended to work on small laptops and tablets, although we did end up supporting phones too later on.
It did not have to support web.
Overall, React Native Windows was reasonable to work with, but with some big caveats.
Many of our tickets took longer to get the features to work in Windows. Sometimes up to double or even more, above supporting iOS and Android.
One of the tougher aspects was that when we'd google for an error message, it was rare to find help, especially React Native specific help.
There are just not a lot of Stackoverflow questions/answers and blog posts out there about it, since it's so niche.
Third-party libraries certainly were an issue.
For the most part, the biggest libraries worked okay. But it's rare that the less prominent libraries would work with RN Windows, if they relied on native code at all.
(I help maintain one of the more commonly used libraries, React Native WebView, and Microsoft has a team that sends us PRs for RN Windows.)
In cases where there was a choice of several React Native libraries, we would generally bias toward the pure JavaScript versions, since pure JS libraries worked great on RN Windows.
For example, this app had a signature capability. We couldn't use react-native-signature-capture or other similar ones because they didn't support React Native Windows. We instead reached for a pure JS library, react-native-signature-canvas, which worked well. It uses RN WebView.
It actually really helps that Expo doesn't (usually) allow native coding, which encourages the ecosystem to provide JS-only solutions like react-native-signature-canvas.
We (successfully) tried to avoid dropping down into C# for native integrations. While we have people at Infinite Red who can do C# / React Native integrations, it's a more specialized skill, and would have left our client with more challenging maintenance.
We did use more WebViews than normal. For example, our entire authentication flow is actually just a WebView. Could probably have built it in RN Windows, but in the interest of time we didn't.
Reminds me a bit of the old days of React Native, to be honest!
All in all, I'm interested in doing more! We have a lot more experience now and RN Windows is a valid platform target for React Native. Send me your RN Windows projects & let's talk. :-)
• • •
Missing some Tweet in this thread? You can try to
force a refresh
1. Be kind, to everyone 2. If you control something (releases, etc) then try to set reasonable expectations and communicate when you can't meet those or recruit others to help you do so
3. For issues/tech support, ask the other person to do a reasonable amount of due diligence. Asking them to create a minimal repro is more than reasonable
4. If they do create a minimal repro, now the issue is prime for someone to fix it, so label it accordingly and broadcast it to people who might be interested in helping. I always ask the person who filed the issue to take a crack at it
I need a warning system for people I follow when I see obvious engagement grift. Like a “three strikes and you’re out” system.
I mean, you can find some of those tweets by me back in the day, maybe. But they weren’t formulaic like today. People recognized what works and just go through the playbook now.
Tonight's "coding for fun" task is to figure out why we're running into a bit of a perf problem with MobX-State-Tree and MobX-React-Lite in a specific large data set situation.
I'm first going to try to replicate the conditions in a bare React Native app.
Live-tweet it?
First, I'm spinning up a new RN app.
`npx react-native init MSTPerf`
I could have used the TypeScript template project, but decided to add it myself using the instructions here.
@mattlanham@imjakechapman At Infinite Red, we used Redux for several years, and it worked fine. We used redux-saga for side effects and made a few helper libraries to make it better.
1/
@mattlanham@imjakechapman One of our devs found MobX and MobX-State-Tree. MobX was a little too free-form for us, but MST fit the bill -- it had little boilerplate and also came with MobX-React which gave superior performance on state changes.
3/
Life is ultimately calmer when one faces their problems head-on instead of avoiding them. You can avoid problems for quite a while, but in my 30s I had to face many of them. They eventually will catch up to you.
But don't do hard things alone.
Get a counselor, therapist, doctor, pastor, or life coach (depending on the situation). Or even just a close friend.* Have someone on your side.
(*Don't expect too much from friends. They're friends, not taking the place of trained pros.)
Build your conflict resolution skills! So many of my problems came about because I didn't know how to resolve conflicts effectively.
I see this in my friends. They suffer for weeks because they don't want to have one hard conversation. Or make commitments they can't keep.