<?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 Ayanghosh Dev on Medium]]></title>
        <description><![CDATA[Stories by Ayanghosh Dev on Medium]]></description>
        <link>https://medium.com/@ayanghosh.dev?source=rss-d029e4e64591------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*ZgyjnTixZAO3FrUEY2Ubqw.jpeg</url>
            <title>Stories by Ayanghosh Dev on Medium</title>
            <link>https://medium.com/@ayanghosh.dev?source=rss-d029e4e64591------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 22:06:57 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ayanghosh.dev/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[LocalStorage with Expiry Support]]></title>
            <link>https://medium.com/@ayanghosh.dev/localstorage-with-expiry-support-24a97d32e321?source=rss-d029e4e64591------2</link>
            <guid isPermaLink="false">https://medium.com/p/24a97d32e321</guid>
            <category><![CDATA[localstorage]]></category>
            <category><![CDATA[cookies]]></category>
            <category><![CDATA[cache]]></category>
            <category><![CDATA[browser-storage]]></category>
            <category><![CDATA[sessions]]></category>
            <dc:creator><![CDATA[Ayanghosh Dev]]></dc:creator>
            <pubDate>Fri, 28 Feb 2025 08:23:17 GMT</pubDate>
            <atom:updated>2025-02-28T08:23:17.214Z</atom:updated>
            <content:encoded><![CDATA[<p>LocalStorage is great, but it doesn’t support automatic expiration. expiry-localstorage fixes this by allowing you to store data with an expiry time, ensuring old data is removed automatically.</p><h3>🚀 Why Use expiry-localstorage?</h3><ul><li><strong>Auto Expiry</strong>: Removes outdated data automatically.</li><li><strong>Lightweight</strong>: Minimal impact on performance.</li><li><strong>Simple API</strong>: Works like localStorage but with expiry.</li></ul><h3>📦 Installation</h3><p>Install via npm:</p><pre>npm i expiry-localstorage</pre><h3>📖 Usage</h3><h3>Import</h3><pre>import expiryLocalStorage from &quot;expiry-localstorage&quot;;</pre><h3>Store an Item</h3><pre>expiryLocalStorage.setItem(&quot;key&quot;, &quot;value&quot;, 200000); // Expires in 200 seconds</pre><h3>Retrieve an Item</h3><pre>const result = expiryLocalStorage.getItem(&quot;key&quot;);<br>console.log(result); // &quot;value&quot; if not expired, otherwise `null`</pre><h3>🛠 API Reference</h3><h3>setItem(key, value, expiry)</h3><p>Stores a value with an expiry time (in ms).</p><h3>getItem(key)</h3><p>Retrieves a value if not expired; otherwise returns null.</p><h3>🔥 Use Cases</h3><ul><li><strong>Session Storage</strong>: Auto-clear session data.</li><li><strong>User Preferences</strong>: Store temporary settings.</li><li><strong>API Caching</strong>: Save API responses with expiry.</li></ul><h3>📜 License</h3><p>MIT License</p><h3>👨‍💻 Author</h3><p><strong>Ayan Ghosh</strong></p><p>Love this tool? ⭐ Star it on GitHub!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=24a97d32e321" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why the Tailwind Plugin Function is a Game Changer]]></title>
            <link>https://medium.com/@ayanghosh.dev/why-the-tailwind-plugin-function-is-a-game-changer-8d12d5dd9804?source=rss-d029e4e64591------2</link>
            <guid isPermaLink="false">https://medium.com/p/8d12d5dd9804</guid>
            <category><![CDATA[tailwind-css]]></category>
            <category><![CDATA[remix]]></category>
            <category><![CDATA[tailwind-ui]]></category>
            <category><![CDATA[tailwind-css-tutorial]]></category>
            <dc:creator><![CDATA[Ayanghosh Dev]]></dc:creator>
            <pubDate>Sun, 08 Dec 2024 07:05:14 GMT</pubDate>
            <atom:updated>2024-12-08T07:05:14.499Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Tailwind css logo" src="https://cdn-images-1.medium.com/max/1024/1*PEmupKUDEgl1vbzhw0dzrg.png" /></figure><p>With the Tailwind plugin function, you can encapsulate multiple utility classes into a single custom class name. Not only does this clean up your HTML, but it also allows you to create <strong>responsive designs effortlessly</strong> while maintaining your sanity.</p><h4>For example, instead of cluttering your HTML with multiple classes like this:</h4><pre>&lt;h1 class=&quot;text-4xl sm:text-6xl sm:leading-[72px] font-semibold sm:font-bold&quot;&gt;<br>  Responsive Heading<br>&lt;/h1&gt;</pre><p>You can define a <strong>custom Tailwind plugin</strong> and use a single class name:</p><pre>&lt;h1 class=&quot;h1&quot;&gt;Responsive Heading&lt;/h1&gt;</pre><p>And in your Tailwind plugin, you can bundle all those classes together:</p><pre>import plugin from &quot;tailwindcss/plugin&quot;;<br><br>export const appTypographyPlugin = plugin(function ({ addComponents }) {<br>  addComponents({<br>    // Heading 1<br>    &quot;.h1&quot;: {<br>      &quot;@apply text-4xl sm:text-6xl sm:leading-[72px] font-semibold sm:font-bold&quot;:<br>        {},<br>    },<br>    // Heading 2<br>    &quot;.h2&quot;: {<br>      &quot;@apply text-lg sm:text-3xl sm:leading-[40px] font-semibold tracking-[-0.02em]&quot;:<br>        {},<br>    },<br>    // Heading 3<br>    &quot;.h3&quot;: {<br>      &quot;@apply text-base sm:text-2xl sm:leading-[36px] font-semibold tracking-[-0.02em]&quot;:<br>        {},<br>    },<br>    // Subtitle<br>    &quot;.subtitle&quot;: {<br>      &quot;@apply text-base sm:text-lg leading-[28px] font-normal&quot;: {}, // Mobile (18px) and Desktop (20px)<br>    },<br>    // Body1<br>    &quot;.body1&quot;: {<br>      &quot;@apply text-sm sm:text-base leading-[24px] sm:leading-[28px] font-normal&quot;:<br>        {}, // Mobile (16px) and Desktop (18px)<br>    },<br>    // Body2<br>    &quot;.body2&quot;: {<br>      &quot;@apply text-sm leading-[24px] font-normal&quot;: {}, // 16px and 24px for all screen sizes<br>    },<br>    // Body3<br>    &quot;.body3&quot;: {<br>      &quot;@apply text-xs leading-[20px] font-normal&quot;: {}, // 14px and 20px for all screen sizes<br>    },<br>  });<br>});</pre><p>Add your custom plugin in tailwind config file.</p><pre>// tailwind.config.js<br>import { appTypographyPlugin } from &quot;./src/utils/tailwind-plugins&quot;;<br><br>export default {<br>  content: [<br>    &#39;./src/**/*.{html,js,jsx,ts,tsx}&#39;, // Adjust this path as needed<br>  ],<br>  theme: {<br>    extend: {},<br>  },<br>  plugins: [<br>    appTypographyPlugin<br>  ],<br>};</pre><h3>Why This Changed Everything for Me</h3><ol><li><strong>Clean HTML:</strong><br>My HTML tags are now readable and clean. No more “class soup” with 10+ utility classes in one tag.</li><li><strong>Reusability:</strong><br>The custom classes I create can be reused across the entire project, reducing repetition and improving maintainability.</li><li><strong>Responsive by Design:</strong><br>Tailwind makes adding responsive styles simple, and the plugin function lets me group those styles into one class name. Now I can quickly create adaptive designs without repeating myself.</li><li><strong>Consistency:</strong><br>Custom plugins enforce consistency across the project. The same design patterns are applied everywhere, reducing bugs and design discrepancies.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8d12d5dd9804" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>