Category: JS
-
Apple Pay Icon rounded corners are broken in React Native and Skia
This could happen to any other icon. It turned out that since Skia’s SVG renderer is a subset of the browser SVG rendering. In our case, the issue was that the elements do not inherit the fill of their parent, leading to a ract that is usually transparent to be rendered in black (the default…
-

Environment Variable is set but I cannot get it from process.env in a react app in production
The WTF Ever got the case where you console.log(process.env) and you see your env variable right there, with the right value, but when you do console.log(process.env.YOUR_VAR) you get a mere empty string? Here’s my story on how I shot myself in the foot and needed 3 days to figure out why my env variable was…
-

See the actual code that makes React Router Serve work
If you run npx react-router reveal in your project with React Router 7+, it will create an entry.server.tsx and an entry.client.tsx file that define how react-router serve works by default for your app.
-
Local Expo Build for Android Fails (related to google-services.json)
If your Android build is failing and you still have the google-services.json present in your project, remove (or comment out) the entry from the .gitignore while building it. I am using expo with push notifications and constantly face this issue… Update: You can actually commit it to the repo (since the guideline is that this…
-
Hosting a remix.run app on a shared hosting with cPanel – pro’s checklist
Prerequisites: be thrifty and decide to save money by hosting a remix app on a classic shared hosting provider (like PHP is still a thing). If you’re lucky, All SHOULD work 🙂 if not – check the stderr.log or dig deeper in the more extensive post.
-

Hosting a Remix App on a Shared Hosting (using cPanel, Phusion Passenger and LiteSpeed)
TL;DR: Short checklist for pros Figuring this out took me longer than I expected, and I was quite surprised that hosting remix apps is not a well-covered topic. Hosting a remix app on a shared hosting provider is even less covered. Backstory – I’m building a native app and a management portal and decided to…
-

A Prisma DB Entry is Missing a field (or it has the value of another field)
I have a remix.run project that uses Prisma and Sqlite for the DB. At a point, I got an entry from the DB, where one of the fields had the value of the other field. The other field had no value, whatsoever. Example: an entry with location and startTime, both strings: the location had a…
-

How to use a Remix form with an action without following its URL
I’m relatively new to remix.run and try to follow the best practices (e.g. use forms for everything). Today I wanted to have a form for an action that does not update the URL. If I kept it with the default form, refreshing the page would lead to an error because I didn’t want to add…
-

VSCode Tip of the Day – Go to References
You can see all the locations in your project that use a React component (or a function), by right-clicking its definition and pressing “Go to References” And a shortcut I need to learn to use more often is Shift+F12 for it 🙂
-

React Native BottomSheetBackdrop not showing
I am using the BottomSheet and BottomSheetModal (@gorhom/bottom-sheet) in a react native app – it brings the fluid experience a user would expect from a native app. Recently I had an issue with the Backdrop, where it wouldn’t show (I was using it with a BottomSheetModal). It turns out, that to make it render you…