🌐 Detecting your location…
📢 Advertisement — Configure AdSense in Appearance → Customize → AdSense Settings

প্রতিক্রিয়া নেটিভ টিউটোরিয়াল 2026: এক্সপো, নেভিগেশন এবং অ্যাপ স্টোর স্থাপনা

⏱️4 min read  ·  720 words

নিউ আর্কিটেকচার (JSI + Fabric), Expo SDK 52, এবং React 19 সাপোর্টের সাথে 2026 সালে নেটিভ রিঅ্যাক্ট করুন যা উৎপাদন মোবাইল অ্যাপ তৈরিকে আগের চেয়ে দ্রুত করে তোলে। আপনি যদি ইতিমধ্যেই প্রতিক্রিয়া জানেন তবে প্রতিক্রিয়া নেটিভ আপনাকে 85-90% ভাগ করা কোড সহ iOS এবং Android অ্যাপ তৈরি করতে দেয়। এই টিউটোরিয়ালটি প্রয়োজনীয় বিষয়গুলি কভার করে।

সেটআপ

# Using Expo (recommended for new projects)
npx create-expo-app@latest MyApp
cd MyApp
npx expo start

# Or bare workflow (more control, more setup)
npx @react-native-community/cli@latest init MyApp --new-architecture
cd MyApp
npx pod-install  # iOS only
npx react-native run-ios    # requires macOS + Xcode
npx react-native run-android  # requires Android Studio

মূল উপাদান

import {
  View, Text, StyleSheet, Pressable,
  ScrollView, FlatList, Image,
  TextInput, SafeAreaView, Platform,
} from 'react-native';

// No div, span, p — use View and Text instead
export default function HomeScreen() {
  return (
    <SafeAreaView style={styles.container}>
      <ScrollView>
        <Text style={styles.title}>Hello React Native!</Text>
        <Text style={styles.body}>
          This runs on iOS and Android natively.
        </Text>
        <Pressable
          style={({ pressed }) => [
            styles.button,
            pressed && styles.buttonPressed,
          ]}
          onPress={() => console.log('Pressed!')}
        >
          <Text style={styles.buttonText}>Tap Me</Text>
        </Pressable>
      </ScrollView>
    </SafeAreaView>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#fff',
  },
  title: {
    fontSize: 28,
    fontWeight: 'bold',
    padding: 16,
    // Platform-specific
    ...Platform.select({
      ios: { fontFamily: 'SF Pro Display' },
      android: { fontFamily: 'Roboto' },
    }),
  },
  body: {
    fontSize: 16,
    color: '#555',
    paddingHorizontal: 16,
    lineHeight: 24,
  },
  button: {
    backgroundColor: '#0066CC',
    margin: 16,
    padding: 16,
    borderRadius: 12,
    alignItems: 'center',
  },
  buttonPressed: {
    opacity: 0.7,
    transform: [{ scale: 0.98 }],
  },
  buttonText: {
    color: 'white',
    fontWeight: '600',
    fontSize: 16,
  },
});

প্রতিক্রিয়া নেভিগেশন সঙ্গে নেভিগেশন

npm install @react-navigation/native @react-navigation/native-stack
npm install react-native-screens react-native-safe-area-context

import { NavigationContainer } from '@react-navigation/native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';

type RootStackParamList = {
  Home: undefined;
  Profile: { userId: number };
  Settings: undefined;
};

const Stack = createNativeStackNavigator<RootStackParamList>();

export default function App() {
  return (
    <NavigationContainer>
      <Stack.Navigator
        initialRouteName="Home"
        screenOptions={{
          headerStyle: { backgroundColor: '#0066CC' },
          headerTintColor: 'white',
        }}
      >
        <Stack.Screen name="Home" component={HomeScreen} />
        <Stack.Screen name="Profile" component={ProfileScreen} />
        <Stack.Screen name="Settings" component={SettingsScreen} />
      </Stack.Navigator>
    </NavigationContainer>
  );
}

// Navigate between screens
function HomeScreen({ navigation }) {
  return (
    <View>
      <Pressable onPress={() => navigation.navigate('Profile', { userId: 1 })}>
        <Text>Go to Profile</Text>
      </Pressable>
    </View>
  );
}

function ProfileScreen({ route, navigation }) {
  const { userId } = route.params;  // typed!
  return <Text>Profile {userId}</Text>;
}

ডেটা আনা

import { useQuery, useMutation, QueryClient, QueryClientProvider } from '@tanstack/react-query';

const queryClient = new QueryClient();

// Wrap app
export default function App() {
  return (
    <QueryClientProvider client={queryClient}>
      <NavigationContainer>...</NavigationContainer>
    </QueryClientProvider>
  );
}

// Fetch users
function UserList() {
  const { data, isLoading, error } = useQuery({
    queryKey: ['users'],
    queryFn: () => fetch('https://api.example.com/users').then(r => r.json()),
  });

  if (isLoading) return <ActivityIndicator size="large" />;
  if (error) return <Text>Error: {error.message}</Text>;

  return (
    <FlatList
      data={data}
      keyExtractor={user => user.id.toString()}
      renderItem={({ item }) => (
        <View style={styles.userCard}>
          <Image source={{ uri: item.avatarUrl }} style={styles.avatar} />
          <Text style={styles.userName}>{item.name}</Text>
        </View>
      )}
    />
  );
}

স্থানীয় স্টোরেজ এবং রাজ্য

npm install @react-native-async-storage/async-storage
npm install zustand  # lightweight state management

import AsyncStorage from '@react-native-async-storage/async-storage';
import { create } from 'zustand';
import { persist, createJSONStorage } from 'zustand/middleware';

// Zustand store with AsyncStorage persistence
interface UserStore {
  user: User | null;
  token: string | null;
  setUser: (user: User, token: string) => void;
  logout: () => void;
}

export const useUserStore = create<UserStore>()(
  persist(
    (set) => ({
      user: null,
      token: null,
      setUser: (user, token) => set({ user, token }),
      logout: () => set({ user: null, token: null }),
    }),
    {
      name: 'user-storage',
      storage: createJSONStorage(() => AsyncStorage),
    }
  )
);

// Usage in component
function ProfileScreen() {
  const { user, logout } = useUserStore();
  return (
    <View>
      <Text>Welcome, {user?.name}!</Text>
      <Pressable onPress={logout}>
        <Text>Logout</Text>
      </Pressable>
    </View>
  );
}

এক্সপো রাউটার (ফাইল-ভিত্তিক রাউটিং)

// app/(tabs)/index.tsx  → "/" tab
// app/(tabs)/profile.tsx → "/profile" tab
// app/[id].tsx → dynamic route

// Expo Router — Next.js-style for mobile
import { Stack, Tabs } from 'expo-router';

export default function RootLayout() {
  return <Stack />;
}

// app/(tabs)/_layout.tsx
export default function TabLayout() {
  return (
    <Tabs>
      <Tabs.Screen name="index" options={{ title: 'Home' }} />
      <Tabs.Screen name="profile" options={{ title: 'Profile' }} />
    </Tabs>
  );
}

অ্যাপ স্টোরে প্রকাশ করা হচ্ছে

# Expo EAS (Expo Application Services) — recommended
npm install -g eas-cli
eas login
eas build:configure

# Build for production
eas build --platform ios      # builds .ipa for App Store
eas build --platform android  # builds .aab for Play Store
eas build --platform all      # both simultaneously

# Submit to stores
eas submit --platform ios
eas submit --platform android

রিঅ্যাক্ট নেটিভ ইন 2026 বেশিরভাগ মোবাইল অ্যাপ ব্যবহারের ক্ষেত্রে উৎপাদনের জন্য প্রস্তুত। নতুন আর্কিটেকচার পুরানো জাভাস্ক্রিপ্ট ব্রিজকে সরিয়ে দেয়, অ্যানিমেশনগুলিকে মসৃণ করে এবং নেটিভ মডিউল কলগুলিকে দ্রুত করে। দ্রুত বিকাশ এবং সহজ স্থাপনার জন্য এক্সপো ব্যবহার করুন — আপনার সম্পূর্ণ নেটিভ অ্যাক্সেসের প্রয়োজন হলে আপনি সর্বদা বেয়ার ওয়ার্কফ্লো থেকে বের হয়ে যেতে পারেন। আপনি যদি রিঅ্যাক্ট জানেন, রিঅ্যাক্ট নেটিভের শেখার বক্ররেখা 2-4 সপ্তাহের মধ্যে পরিচালনা করা যায়।

✍️ Leave a Comment

Your email address will not be published. Required fields are marked *

🌐 Read in:🇬🇧 English🇩🇪 Deutsch🇧🇷 Português🇸🇦 العربية🇮🇳 हिन्दी🇧🇩 বাংলা