Architecture, navigation, native modules, performance
Practise these as flashcards. One or two lines each; the ones you miss come back first.
Start freeReact Native renders UI components by running JavaScript code that describes the UI, then communicates with native code to draw the components. Traditionally, this was done using the bridge, which sends messages between JS and native threads.
Expo is a managed workflow for React Native that simplifies setup and deployment by handling native configuration for you. I use Expo for quick prototyping or when I don't need custom native modules.
I use navigation libraries like React Navigation, which provide stack, tab, and drawer navigators. These libraries manage screen transitions and navigation state.
I use libraries like react-native-permissions or Expo's permissions API to request permissions at runtime, and handle the user's response to ensure the app works correctly.
Expo manages native dependencies and configuration, making development easier but limiting custom native integrations. Bare workflow gives full access to native code, allowing custom modules but requiring manual setup and maintenance.
FlatList only renders visible items and recycles views, reducing memory usage and improving performance for large lists. ScrollView renders all items at once, which can cause slowdowns with large datasets.
I use keyExtractor for stable keys, extraData to control updates, and wrap item components with React.memo to avoid re-rendering unless props change.
OTA updates let you push JS and asset changes directly to users without app store approval, using services like Expo Updates or CodePush. Native code changes still require app store releases.
I configure the navigation container with a linking prop, specifying URL prefixes and screen mappings, so the app can open specific screens from URLs or notifications.
JSI (JavaScript Interface) allows direct and synchronous access to native APIs from JavaScript, reducing overhead compared to the bridge. This results in faster communication and improved UI responsiveness.
I request permissions at runtime using platform-specific APIs, check the status before accessing features, and handle denied permissions gracefully to avoid crashes.
Expo OTA updates are fast and don't require app store approval, but can't change native code or permissions. App store releases are slower but necessary for native changes and compliance with platform policies.