<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: AUBE</title>
    <description>The latest articles on DEV Community by AUBE (@ayoubrechouk).</description>
    <link>https://dev.to/ayoubrechouk</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4245159%2Ff768ba14-5a8a-47e9-8691-9c8f085ba9e2.png</url>
      <title>DEV Community: AUBE</title>
      <link>https://dev.to/ayoubrechouk</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ayoubrechouk"/>
    <language>en</language>
    <item>
      <title>How I Built a Fast Book Search &amp; Cataloging System in React 19 Using Redux Toolkit</title>
      <dc:creator>AUBE</dc:creator>
      <pubDate>Sun, 15 Nov 2026 19:59:58 +0000</pubDate>
      <link>https://dev.to/ayoubrechouk/how-i-built-a-fast-book-search-cataloging-system-in-react-19-using-redux-toolkit-31o8</link>
      <guid>https://dev.to/ayoubrechouk/how-i-built-a-fast-book-search-cataloging-system-in-react-19-using-redux-toolkit-31o8</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftxgxdb6rvgi6uw4xnj2v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftxgxdb6rvgi6uw4xnj2v.png" alt=" " width="800" height="379"&gt;&lt;/a&gt; The Problem: Managing Complex Book Data Without Prop Drilling&lt;/p&gt;

&lt;p&gt;When I started building &lt;strong&gt;&lt;a href="https://ayubooks.vercel.app/" rel="noopener noreferrer"&gt;AYUBOOKS&lt;/a&gt;&lt;/strong&gt;, a digital cataloging and reading platform inspired by Letterboxd, the initial prototype relied heavily on local component state (&lt;code&gt;useState&lt;/code&gt;). Everything worked smoothly with just a handful of books. &lt;/p&gt;

&lt;p&gt;However, as the catalog grew and I introduced real-world features—such as instant search filtering, category tagging, tracking reading statuses, and user reviews—three major bottlenecks quickly emerged:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Severe Prop Drilling:&lt;/strong&gt; Passing book lists, search queries, and state-updating functions down through multiple layers of nested components (from the main layout to search bars, filter sidebars, and individual book cards) made the codebase rigid and hard to refactor.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;State Synchronization Bugs:&lt;/strong&gt; Updating a book's status in one view (like marking it as "Read" inside a modal) didn't always reflect immediately in the main catalog grid or user statistics without messy workarounds.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unnecessary Re-renders:&lt;/strong&gt; Every keystroke in the search bar triggered state updates at the top level, causing large portions of the UI tree to re-render and making the filtering experience feel sluggish.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To keep &lt;strong&gt;AYUBOOKS&lt;/strong&gt; fast, scalable, and maintainable, I needed a centralized, predictable state management solution—which led me to refactor the core architecture using &lt;strong&gt;Redux Toolkit&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Architecture: Centralizing State with Redux Toolkit
&lt;/h2&gt;

&lt;p&gt;Instead of reaching for boilerplate-heavy classic Redux, I integrated &lt;strong&gt;Redux Toolkit (RTK)&lt;/strong&gt; alongside &lt;strong&gt;React 19&lt;/strong&gt; and &lt;strong&gt;Vite&lt;/strong&gt;. RTK gave me a single source of truth for the entire book catalog while keeping the logic modular and easy to debug.&lt;/p&gt;

&lt;p&gt;Here is how I structured the Redux store folder inside the project:&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
text
src/
├── app/
│   └── store.js          # Configures the central Redux store
└── features/
    └── books/
        ├── booksSlice.js # Manages catalog data, search query, and status updates
        └── BookList.jsx  # Renders the filtered book grid cleanly`// src/features/books/booksSlice.js
import { createSlice } from '@reduxjs/toolkit';

const initialState = {
  items: [], // Populated with book objects { id, title, author, category, status }
  searchQuery: '',
  selectedCategory: 'All',
};

const booksSlice = createSlice({
  name: 'books',
  initialState,
  reducers: {
    setBooks: (state, action) =&amp;gt; {
      state.items = action.payload;
    },
    setSearchQuery: (state, action) =&amp;gt; {
      state.searchQuery = action.payload;
    },
    setCategoryFilter: (state, action) =&amp;gt; {
      state.selectedCategory = action.payload;
    },
    toggleReadStatus: (state, action) =&amp;gt; {
      const book = state.items.find((b) =&amp;gt; b.id === action.payload);
      if (book) {
        book.status = book.status === 'Read' ? 'Want to Read' : 'Read';
      }
    },
  },
});

export const { 
  setBooks, 
  setSearchQuery, 
  setCategoryFilter, 
  toggleReadStatus 
} = booksSlice.actions;

export default booksSlice.reducer;`
// src/features/books/booksSlice.js
import { createSlice } from '@reduxjs/toolkit';

const initialState = {
  items: [], // Populated with book objects { id, title, author, category, status }
  searchQuery: '',
  selectedCategory: 'All',
};

const booksSlice = createSlice({
  name: 'books',
  initialState,
  reducers: {
    setBooks: (state, action) =&amp;gt; {
      state.items = action.payload;
    },
    setSearchQuery: (state, action) =&amp;gt; {
      state.searchQuery = action.payload;
    },
    setCategoryFilter: (state, action) =&amp;gt; {
      state.selectedCategory = action.payload;
    },
    toggleReadStatus: (state, action) =&amp;gt; {
      const book = state.items.find((b) =&amp;gt; b.id === action.payload);
      if (book) {
        book.status = book.status === 'Read' ? 'Want to Read' : 'Read';
      }
    },
  },
});

export const { 
  setBooks, 
  setSearchQuery, 
  setCategoryFilter, 
  toggleReadStatus 
} = booksSlice.actions;

export default booksSlice.reducer;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>frontend</category>
      <category>javascript</category>
      <category>react</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
