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. Serializable State — Gotchas
RTK QueryAdvanced

Serializable State — Gotchas

Redux-এর serializableCheck, Date/Map-জনিত সাবধানতা — বাংলায়।

7টি অংশবাংলা ভাষায়

Redux DevTools ও Redux cycle-এ state/action অবশ্যই serializable (JSON-able) হতে হবে। RTK-এর default serializableCheck middleware না-মেনে শুধু সতর্ক করে — runtime ভঙ্গ হয় না, তবে এড়িয়ে চলা ভালো।

কোন মান serializable নয়

  • Date object (→ string timestamp রাখুন)
  • Map / Set (→ plain object/array)
  • class instance / function
  • undefined properties
serializable statets
ts
// খারাপ:
items.map((i) => ({ ...i, addedAt: new Date() }))

// ভালো:
items.map((i) => ({ ...i, addedAt: Date.now() }))
// বা ISO string: new Date().toISOString()

Ignore-যদি দরকার

specific paths ignorets
ts
configureStore({
  middleware: (getDefaultMiddleware) =>
    getDefaultMiddleware({
      serializableCheck: {
        // নির্দিষ্ট non-serializable path এড়িয়ে
        ignoredActions: ["audio/play"],
        ignoredPaths: ["ui.player"],
      },
    }),
  // ...
});
default-সতর্ক ignore নয়

সতর্কতা দেখলে ignore অপশন নয় — মূলত state-এ string/ISO ব্যবহার করা। serializable রেখে dispatching/DevTools/SSR সব মসৃণ।

শেষ প্যারায় নিজে practice করুন — কোড কপি করে নিজের এডিটরে চালিয়ে দেখুন।
আগেরLoading States — Skeleton ও UIপরেরSSR & Hydration — prefetch
এই পেজে
Tech Tutor

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

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

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

mdanamolhasan1998@gmail.com