Tech TutorBangla Web Documentation
Portfolio
HomeHTMLCSSTailwind CSSJavaScriptTypeScriptReactNext.jsNode.jsExpressSocket.IOExpoWordPressPostgreSQLPrismaPostgresNestJSMongoDBDockerTanStackTanStack TableRTK QueryGitGitHub
  • RTK Query Documentation39টি অধ্যায়
প্রযুক্তি নির্বাচন
HomeHTMLCSSTailwind CSSJavaScriptTypeScriptReactNext.jsNode.jsExpressSocket.IOExpoWordPressPostgreSQLPrismaPostgresNestJSMongoDBDockerTanStackTanStack TableRTK QueryGitGitHub
  • Redux Intro
  • Architecture
  • Redux Toolkit
  • Project Setup
  • Folder Structure
  • configureStore
  • Redux Provider
  • createSlice
  • Reducers & Actions
  • Typed Hooks
  • Selectors
  • Devtools
  • RTK Query
  • createApi
  • API Middleware
  • API Tags
  • Fetch List
  • Fetch Detail
  • Mutation — Create
  • Mutation CRUD
  • Cache Invalidation
  • Cache Lifecycle
  • Polling
  • Query Selectors
  • Optimistic Update
  • Cart Slice Full
  • Cart UI
  • Local vs Server
  • Listener Middleware
  • Error Handling
  • Loading States
  • Serializability
  • SSR Prefetch
  • Complete Flow
  • Complete Project
  • Production
  • Common Mistakes
  • Best Practices
  • Interview Q&A
  1. Docs
  2. RTK Query
  3. configureStore — Store Setup
RTK QueryBeginner

configureStore — Store Setup

configureStore-এ reducers ও middleware-এ combining — বাংলায়।

4টি অংশবাংলা ভাষায়
src/app/store.tsts
ts
"use client";

import { configureStore } from "@reduxjs/toolkit";
import cartReducer from "@/features/cart/cartSlice";
import { ordersApi } from "@/features/orders/ordersService";

export const store = configureStore({
  reducer: {
    cart: cartReducer,
    // RTK Query-এর নিজস্ব slice
    [ordersApi.reducerPath]: ordersApi.reducer,
  },
  middleware: (getDefaultMiddleware) =>
    getDefaultMiddleware().concat(ordersApi.middleware),
});

// Types
export type RootState = ReturnType<typeof store.getState>;
export type AppDispatch = typeof store.dispatch;

প্রতিটি জিনিস কী করে

  • reducer object → store-এ একসাথে মাউন্ট
  • [ordersApi.reducerPath] → RTK Query-র cache slice store-এ বসে
  • middleware concat → RTK Query-র এর নিজস্ব subscription/logic চলে
  • RootState / AppDispatch → typed helpers — সম্পূর্ণ অ্যাপে ব্যবহৃত
reducerPath

ডিফল্ট reducerPath: "api" — concat করার সময় [productsApi.reducerPath] লেখা বেশি নিরাপদ, কারণ নাম বদলালে store-auto আপডেট থাকে। createApi-তে এটি কাস্টমাইজও করা যায়।

শেষ প্যারায় নিজে practice করুন — কোড কপি করে নিজের এডিটরে চালিয়ে দেখুন।
আগেরFolder Structure — Redux PatternপরেরRedux Provider — Next.js-এ Wrap
এই পেজে
Tech Tutor

বাংলায় ওয়েব ডেভেলপমেন্ট ডকুমেন্টেশন শিখুন — ধাপে ধাপে।

Homeসব ডকুমেন্টেশনQuick Startআমার নোটস

© 2026 Tech Tutor. বাংলায় শিখুন, বাংলায় গড়ুন।

mdanamolhasan1998@gmail.com