<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ishu Khatri on Medium]]></title>
        <description><![CDATA[Stories by Ishu Khatri on Medium]]></description>
        <link>https://medium.com/@ishukhatri?source=rss-357ce9cecce6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*CG1hwoPVuudK0Af1.</url>
            <title>Stories by Ishu Khatri on Medium</title>
            <link>https://medium.com/@ishukhatri?source=rss-357ce9cecce6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 20:38:57 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ishukhatri/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[what is difference between slices and selectors?]]></title>
            <link>https://medium.com/@ishukhatri/what-is-difference-between-slices-and-selectors-897fd8d2c2e?source=rss-357ce9cecce6------2</link>
            <guid isPermaLink="false">https://medium.com/p/897fd8d2c2e</guid>
            <category><![CDATA[redux]]></category>
            <dc:creator><![CDATA[Ishu Khatri]]></dc:creator>
            <pubDate>Mon, 28 Aug 2023 18:19:43 GMT</pubDate>
            <atom:updated>2023-08-28T18:19:43.614Z</atom:updated>
            <content:encoded><![CDATA[<p>Slices and selectors are both concepts within Redux, but they serve different purposes and handle different aspects of your state management.</p><ol><li><strong>Slices:</strong> A slice is a modular unit of your Redux store that includes the state definition, actions, and reducers related to a specific domain of your application. It’s a way to organize your state management code into smaller, manageable pieces. Slices typically consist of three main parts:</li></ol><ul><li>State Definition: The initial state and structure of the slice’s data.</li><li>Actions: Action creators that define how to modify the state.</li><li>Reducers: Reducers that handle state modifications based on dispatched actions.</li></ul><p>Slices encapsulate related state and its manipulation logic, making it easier to understand, test, and update your Redux code.</p><p><strong>2. Selectors:</strong> Selectors are functions that retrieve specific pieces of data from the Redux store. They provide a way to access and derive data from your state without needing to know its exact structure. Selectors can be thought of as queries to your state, and they help in separating the concerns of data retrieval from the components that need the data.</p><p>Using selectors, you can avoid directly accessing the state’s structure within your components. Instead, you can create selectors that encapsulate the logic for extracting the required data. This improves maintainability and allows you to make changes to your state structure without affecting the components using it.</p><p><strong>In summary,</strong> slices are about managing the state and its changes, while selectors are about querying and extracting data from the state in a structured and reusable manner. They work together to provide a more organized and efficient approach to Redux state management.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=897fd8d2c2e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>