Want Absolute Imports in React Native? Just Add a Little JSON

If you’ve spent any time working with React Native, you’ve probably run into a peculiar quirk where you’re seemingly forced to use relative imports in all of your source files. Things start to look a bit like this: import {Thing} from "../../../../core/thing"; import {Foo} from "../../foo"; It all quickly becomes unwieldy because it requires you […]

Setting Up React Native Localization for Multi-Language Apps

React Native Localization (RNL) makes localization much easier to implement, significantly shortening development time. This is a step-by-step guide to setting up RNL, plus some tips for implementation with multi-language apps. Setting Up React Native Localization It only takes two commands to get the library installed: yarn add react-native-localization cd ios && pod install Next, […]

Setting Up Recurring Push Notifications in React Native

Recurring push notifications in React Native can be a useful tool to send messages to users on a regular schedule. Below is a step-by-step guide to adding this functionality to a React Native app. Note: this tutorial follows steps for react-native >= 0.60. For older versions of React Native, please refer to the individual libraries’ […]

Styling Custom Components in React Native Using TypeScript

I recently ran into an issue with providing style properties to custom React Native components written in TypeScript. When defining the type of the style property, we were using the ViewStyle and TextStyle types provided by React Native. interface Props { textStyle?: TextStyle; viewStyle?: ViewStyle; } class BlogPost extends React.PureComponent<Props> { render() { return ( <View […]