useDebounce β Stop Unnecessary API Calls β³
When handling search inputs or live updates, debouncing prevents excessive API requests by delaying execution until the user stops typing.
Implementation:
Usage Example:
β Why Use It?
- Reduces unnecessary API calls
- Improves performance in search fields
- Ensures a smooth user experience
React Native Hub | #customhooks
When handling search inputs or live updates, debouncing prevents excessive API requests by delaying execution until the user stops typing.
Implementation:
import { useState, useEffect } from "react";
function useDebounce(value, delay = 500) {
const [debouncedValue, setDebouncedValue] = useState(value);
useEffect(() => {
const handler = setTimeout(() => setDebouncedValue(value), delay);
return () => clearTimeout(handler);
}, [value, delay]);
return debouncedValue;
}
export default useDebounce;
Usage Example:
const [searchTerm, setSearchTerm] = useState("");
const debouncedSearch = useDebounce(searchTerm, 300);
useEffect(() => {
if (debouncedSearch) {
fetch(`https://api.example.com/search?q=${debouncedSearch}`)
.then((res) => res.json())
.then((data) => console.log(data));
}
}, [debouncedSearch]);
<TextInput
placeholder="Search..."
onChangeText={(text) => setSearchTerm(text)}
/>;
β Why Use It?
- Reduces unnecessary API calls
- Improves performance in search fields
- Ensures a smooth user experience
React Native Hub | #customhooks
π7π1
π React Native 0.80 is out! Key updates you should know:
- Upgrades to React 19.1.0 for improved stability and bug fixes
- Introduces a new Strict TypeScript API (opt-in) with enhanced typings and reduced breaking changes
- Freezes the Legacy Architecture, paving the way for better future performanceβwatch for compatibility warnings
- iOS builds faster (up to ~12% improvement) with experimental prebuilt dependencies
- Android APK size drops (~1 MB) thanks to Interprocedural Optimization (IPO)
- The New App screen is now modular and visually refreshed
- Last RN version with bundled JavaScriptCore (JSC) β future releases will require community JSC
Read the full article here
React Native Hub
- Upgrades to React 19.1.0 for improved stability and bug fixes
- Introduces a new Strict TypeScript API (opt-in) with enhanced typings and reduced breaking changes
- Freezes the Legacy Architecture, paving the way for better future performanceβwatch for compatibility warnings
- iOS builds faster (up to ~12% improvement) with experimental prebuilt dependencies
- Android APK size drops (~1 MB) thanks to Interprocedural Optimization (IPO)
- The New App screen is now modular and visually refreshed
- Last RN version with bundled JavaScriptCore (JSC) β future releases will require community JSC
Read the full article here
React Native Hub
β‘5π3π1
π Full-Screen Image Viewer in Expo Made Easy
Andrew Chester shows how to implement a sleek, full-screen image viewer with zoom using Expo and the
Key Highlights:
- Install
- Wrap your image in
- Build a reusable overlay using
Perfect for apps where users need to inspect image detailsβjust like Instagram or Facebook.
https://medium.com/@andrew.chester/react-native-expo-full-screen-image-viewer-with-zoom-made-simple-d374081acc6d
React Native Hub
Andrew Chester shows how to implement a sleek, full-screen image viewer with zoom using Expo and the
@likashefqet/react-native-image-zoom library.Key Highlights:
- Install
@likashefqet/react-native-image-zoom + react-native-reanimated + gesture-handler- Wrap your image in
<Zoomable> to enable pinch & double-tap zoom- Build a reusable overlay using
ImageProvider + ImageView + useImperativeHandle for a smooth full-screen experiencePerfect for apps where users need to inspect image detailsβjust like Instagram or Facebook.
https://medium.com/@andrew.chester/react-native-expo-full-screen-image-viewer-with-zoom-made-simple-d374081acc6d
React Native Hub
π₯6
React vs Angular vs Vue
An eternal debate. I decided to ask Ai.
According to o3-pro, here are the key takeaways:
TL;DR β The 2025 Landscape
β React is confidently #1 in both installations and job openings,
β Angular is experiencing a corporate revival after the v17βv18 releases,
β Vue steadily holds its βpleasant and fastβ niche with high community loyalty.
Forecast for 2025β2027
π©βπ» React will remain the de facto standard. The release of React 19 with optimized server streaming will reinforce its leadership.
π©βπ» Angular will grow in the B2B niche thanks to Signals, but its strict TypeScript-first architecture means a high entry barrier.
π©βπ» Vue will continue to be a community favorite, especially in Asia. Itβll retain around 15β17% market share, but is unlikely to surpass Angular in job demand without a strong enterprise push.
π©βπ» React Native Hub
An eternal debate. I decided to ask Ai.
According to o3-pro, here are the key takeaways:
TL;DR β The 2025 Landscape
β React is confidently #1 in both installations and job openings,
β Angular is experiencing a corporate revival after the v17βv18 releases,
β Vue steadily holds its βpleasant and fastβ niche with high community loyalty.
Forecast for 2025β2027
On a global scale, React is objectively βbetterβ by the numbers,
but βbetter for your projectβ β depends on your teamβs needs, deadlines, regulations, and technical debt.
Please open Telegram to view this post
VIEW IN TELEGRAM
π The Future of React Native β What to Expect in 2025
React Native is evolving fast β and 2025 is shaping up to be a game-changer.
This article highlights key trends and innovations to watch:
- Tighter integration with AI and edge computing
- Growth of Expo and server-driven UI
- Better dev tools, faster builds, and more stable releases
π The Future of React Native in 2025
π©βπ» React Native Hub
React Native is evolving fast β and 2025 is shaping up to be a game-changer.
This article highlights key trends and innovations to watch:
- Tighter integration with AI and edge computing
- Growth of Expo and server-driven UI
- Better dev tools, faster builds, and more stable releases
π The Future of React Native in 2025
Please open Telegram to view this post
VIEW IN TELEGRAM
π3
π° How to Monetize a React Native App in 2025
Building apps is great. But turning them into income? Even better.
Here are the top monetization strategies for React Native devs:
π± In-App Purchases
Great for digital goods, subscriptions, or unlocking features.
π Ads (with control!)
Use platforms like AdMob or Facebook Audience Network β just donβt ruin the UX.
π Freemium Model
Offer a free version, upsell the premium with real value.
π Affiliate & Dropshipping
Integrate products/services and earn per conversion. Especially powerful for niche audiences.
π§βπ» SaaS & B2B Tools
Monetize with subscriptions, dashboards, or API-based solutions built on React Native
π©βπ» React Native Hub
Building apps is great. But turning them into income? Even better.
Here are the top monetization strategies for React Native devs:
π± In-App Purchases
Great for digital goods, subscriptions, or unlocking features.
π Ads (with control!)
Use platforms like AdMob or Facebook Audience Network β just donβt ruin the UX.
π Freemium Model
Offer a free version, upsell the premium with real value.
π Affiliate & Dropshipping
Integrate products/services and earn per conversion. Especially powerful for niche audiences.
π§βπ» SaaS & B2B Tools
Monetize with subscriptions, dashboards, or API-based solutions built on React Native
Please open Telegram to view this post
VIEW IN TELEGRAM
π4
π Reusable Toasts in React Native with NativeBase
Showing clear feedback β errors, success, info β is crucial for great UX. But repeating
Save time with reusable toast helpers using NativeBase. Hereβs how! π₯
π‘ What Weβre Building
β 3 handy toast functions:
-
-
-
π§βπ» The Code
Error Toast Helper:
Copy the same pattern for success and info:
βοΈ How to Use
Anywhere in your app:
Pro Tips:
- Use unique IDs for each toast type
- Adjust
- Wrap your text in a styled
π©βπ» React Native Hub
Showing clear feedback β errors, success, info β is crucial for great UX. But repeating
Toast.show() everywhere? Nope.Save time with reusable toast helpers using NativeBase. Hereβs how! π₯
π‘ What Weβre Building
β 3 handy toast functions:
-
errorToast("Something went wrong!")-
successMessageToast("Action completed!")-
infoMessageToast("Heads up!"π§βπ» The Code
Error Toast Helper:
import { Box, Text, Toast } from 'native-base';
import React from 'react';
export const errorToast = (message) => {
const id = 'error-toast';
if (Toast.isActive(id)) return;
Toast.show({
id,
duration: 10000,
render: () => (
<Box bg="red.500" p="2" rounded="sm" mb={5}>
<Text fontSize="md" color="white">
{message}
</Text>
</Box>
),
});
};
Copy the same pattern for success and info:
export const successMessageToast = (message) => {
const id = 'success-toast';
if (Toast.isActive(id)) return;
Toast.show({
id,
duration: 5000,
render: () => (
<Box bg="success.500" p="2" rounded="sm" mb={5}>
<Text fontSize="md" color="white">
{message}
</Text>
</Box>
),
});
};
export const infoMessageToast = (message) => {
const id = 'info-toast';
if (Toast.isActive(id)) return;
Toast.show({
id,
duration: 5000,
render: () => (
<Box bg="info.500" p="2" rounded="sm" mb={5}>
<Text fontSize="md" color="white">
{message}
</Text>
</Box>
),
});
};
βοΈ How to Use
Anywhere in your app:
import { errorToast, successMessageToast } from './toastHelpers';
const handleSubmit = async () => {
try {
await api.submit();
successMessageToast("Submitted successfully!");
} catch (e) {
errorToast("Something went wrong.");
}
};
Pro Tips:
- Use unique IDs for each toast type
- Adjust
duration for critical vs. casual messages- Wrap your text in a styled
Box for consistent themingPlease open Telegram to view this post
VIEW IN TELEGRAM
π3
Inline Functions in Props
Mistake: Defining functions inline inside components, which causes unnecessary re-renders.
Wrong Code:
Correct Practice: Define the function outside or use
π©βπ» React Native Hub
Mistake: Defining functions inline inside components, which causes unnecessary re-renders.
Wrong Code:
import { Button } from 'react-native';
const MyComponent = () => {
return (
<Button title="Press Me" onPress={() => console.log('Button Pressed')} />
);
};
Correct Practice: Define the function outside or use
useCallback to memoize it.
import { Button } from 'react-native';
import { useCallback } from 'react';
const MyComponent = () => {
const handlePress = useCallback(() => {
console.log('Button Pressed');
}, []);
return <Button title="Press Me" onPress={handlePress} />;
};
Please open Telegram to view this post
VIEW IN TELEGRAM
π3
Ignoring Platform-Specific Differences
Mistake: Hardcoding platform-specific logic instead of handling differences dynamically.
Wrong Code:
Correct Practice: Use
π©βπ» React Native Hub
Mistake: Hardcoding platform-specific logic instead of handling differences dynamically.
Wrong Code:
import { StyleSheet, Text } from 'react-native';
const MyComponent = () => {
return <Text style={styles.text}>Hello</Text>;
};
const styles = StyleSheet.create({
text: {
fontSize: 20,
paddingTop: 20, // Might look bad on iOS
},
});
Correct Practice: Use
Platform.select or conditional logic to handle differences.import { StyleSheet, Text, Platform } from 'react-native';
const MyComponent = () => {
return <Text style={styles.text}>Hello</Text>;
};
const styles = StyleSheet.create({
text: {
fontSize: 20,
paddingTop: Platform.select({ ios: 20, android: 10 }),
},
});
Please open Telegram to view this post
VIEW IN TELEGRAM
π6
Hardcoding Dimensions Instead of Using Flexbox
Mistake: Using fixed dimensions for layout, making the app non-responsive.
Wrong Code:
Correct Practice: Use
π©βπ» React Native Hub
Mistake: Using fixed dimensions for layout, making the app non-responsive.
Wrong Code:
import { View, StyleSheet } from 'react-native';
const Box = () => <View style={styles.box} />;
const styles = StyleSheet.create({
box: {
width: 100,
height: 100,
backgroundColor: 'blue',
},
});
Correct Practice: Use
flex for responsive layouts.
import { View, StyleSheet } from 'react-native';
const Box = () => <View style={styles.box} />;
const styles = StyleSheet.create({
box: {
flex: 1,
backgroundColor: 'blue',
},
});
Please open Telegram to view this post
VIEW IN TELEGRAM
π3π₯1
Hey guys!
Just wanted to share this cool article on React Design Patterns. No matter how much experience weβve got, itβs always a good idea to refresh the basics β helps us write cleaner code and build better apps!
Check it out π
https://dev.to/codeparrot/react-design-patterns-best-practices-for-scalable-applications-46ja
React Native Hub
Just wanted to share this cool article on React Design Patterns. No matter how much experience weβve got, itβs always a good idea to refresh the basics β helps us write cleaner code and build better apps!
Check it out π
https://dev.to/codeparrot/react-design-patterns-best-practices-for-scalable-applications-46ja
React Native Hub
π5
β‘ Hermes
Hermes is enabled by default in new Expo projects, but ensure itβs configured:
Impact:60% faster startup times and 30% memory savings
Concrete gains:
- π App startup: 60% faster startup times
- πΎ Memory usage: 30% memory savings
- π¦ Bundle size: Smaller with bytecode pre-compilation
Note: New Architecture is enabled by default since Expo SDK 52 (November 2024) for new projects, and mandatory by default since SDK 53 (April 2025).
React Native Hub
Hermes is enabled by default in new Expo projects, but ensure itβs configured:
// app.json
{
"expo": {
"jsEngine": "hermes",
"plugins": [
["expo-build-properties", {
"android": { "enableHermes": true },
"ios": { "enableHermes": true }
}]
]
}
}
Impact:
Concrete gains:
- π App startup: 60% faster startup times
- πΎ Memory usage: 30% memory savings
- π¦ Bundle size: Smaller with bytecode pre-compilation
Note: New Architecture is enabled by default since Expo SDK 52 (November 2024) for new projects, and mandatory by default since SDK 53 (April 2025).
React Native Hub
π3π₯1
π¨ Splash Screen: Kill the White Flash of Death
Properly configured splash screens prevent the dreaded white flash during app startup:
Control splash screen programmatically:
Pro tips for seamless experience:
- Match colors: Use the same
- Proper timing: Hide splash only after content is ready to render
- Dark mode support: Always provide dark variant for better UX
React Native Hub
Properly configured splash screens prevent the dreaded white flash during app startup:
// app.json
{
"expo": {
"plugins": [
[
"expo-splash-screen",
{
"backgroundColor": "#232323",
"image": "./assets/images/splash-icon.png",
"dark": {
"image": "./assets/images/splash-icon-dark.png",
"backgroundColor": "#000000"
},
"imageWidth": 200
}
]
]
}
}
Control splash screen programmatically:
import * as SplashScreen from 'expo-splash-screen';
// Prevent auto-hide
SplashScreen.preventAutoHideAsync();
// Set animation options
SplashScreen.setOptions({
duration: 1000,
fade: true,
});
// Hide when app is ready
useEffect(() => {
async function prepare() {
try {
// Load fonts, make API calls, etc.
await Font.loadAsync(MyFont);
await loadUserData();
} catch (e) {
console.warn(e);
} finally {
setAppIsReady(true);
}
}
prepare();
}, []);
const onLayoutRootView = useCallback(() => {
if (appIsReady) {
SplashScreen.hide();
}
}, [appIsReady]);
Pro tips for seamless experience:
- Match colors: Use the same
backgroundColor as your first screen- Proper timing: Hide splash only after content is ready to render
- Dark mode support: Always provide dark variant for better UX
React Native Hub
π₯4π1
π Changelog vs Release Notes π
Whatβs the difference? How do you use them correctly?
My friend recently posted an article about this β check it outπ
React Native Hub
Whatβs the difference? How do you use them correctly?
My friend recently posted an article about this β check it out
React Native Hub
Please open Telegram to view this post
VIEW IN TELEGRAM
Hey guysπ
I just dropped a new article on how to style React Native apps the right way β best practices, tips, and examples included.
π Check it out: The Complete React Native Styling Guide
Let me know what you think!
React Native Hub
I just dropped a new article on how to style React Native apps the right way β best practices, tips, and examples included.
π Check it out: The Complete React Native Styling Guide
Let me know what you think!
React Native Hub
π₯7π6
React Native Date Picker
This library solves the problem of implementing Date/Time picker components in your app.
Β· Fully native implementation for all platforms
Β· TurboModules support
Β· Modal and inline modes
Β· Extensive customization options
React Native Hub
This library solves the problem of implementing Date/Time picker components in your app.
Β· Fully native implementation for all platforms
Β· TurboModules support
Β· Modal and inline modes
Β· Extensive customization options
React Native Hub
π₯9β‘4
Hey everyone π
Iβve decided to take this channel in a new direction.
From now on, React Native Hub will become my personal space β Ars Dev. Donβt worry, Iβll still be sharing content about React Native, mobile development, and everything around it. The only difference is that it will be more personal, with my own thoughts, tips, and insights as a developer.
If youβve been following me for React Native content β youβll still get plenty of that. But youβll also see a bit more of my journey in indie app development.
If you enjoy the content here and want to support the growth of this channel, you can buy me a coffee
Thanks for being here π
Please open Telegram to view this post
VIEW IN TELEGRAM
β‘7π₯7π2