<?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: Kushal Rathod</title>
    <description>The latest articles on DEV Community by Kushal Rathod (@thecodster).</description>
    <link>https://dev.to/thecodster</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%2F3715539%2Ff4231179-59ea-4a39-9657-db465a536f8c.png</url>
      <title>DEV Community: Kushal Rathod</title>
      <link>https://dev.to/thecodster</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/thecodster"/>
    <language>en</language>
    <item>
      <title>The Central Store</title>
      <dc:creator>Kushal Rathod</dc:creator>
      <pubDate>Sat, 20 Jun 2026 10:39:50 +0000</pubDate>
      <link>https://dev.to/thecodster/the-central-store-42j7</link>
      <guid>https://dev.to/thecodster/the-central-store-42j7</guid>
      <description>&lt;p&gt;So ever thought, how does the settings page of the website automatically have your data ? Obviously, at some point, user data comes from the database. But do you think that on every page reload, every component of the website directly queries the database again? In most modern applications, the answer is no. Then, how to provide user details to different parts of code, whenever they need it ? So in this blog we would discuss on different methods, which helps in solving this problem in your website.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;The Local Solution&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;So, the first and the very basic solution is storing the required user details in the local storage using the Web Storage API. Using it is simple, you just need to do :-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;localStorage.setItem('key','data'); // To store items
localStorage.getItem('key'); // To fetch items
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Local Storage provides a key-value pair, where you need to create a key and store the details corresponding to that key. But, with great power comes great responsibilities. And local storage fails there. Because anything in local storage is accessible from any JavaScript running on your site. While localStorage is perfectly fine for caching non-sensitive data such as theme preferences, language settings, or UI state, it is generally not recommended for storing authentication tokens or sensitive user information.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Cookies: The Industry Standard&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Hence, comes the best solution which is widely used and implemented by everyone, i.e. storing data in the cookies. Yeah, the same cookie, regarding which you receive a notification, whenever you visit a site 😂.&lt;/p&gt;

&lt;p&gt;Before moving on, let's see, why using cookies is the best :-&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Cookies can be marked as HttpOnly, which prevents JavaScript from accessing them&lt;/li&gt;
&lt;li&gt;Supports various security attributes like secure, same-site, etc.&lt;/li&gt;
&lt;li&gt;But, are cookies fully secure ? No, cookies can be vulnerable to CSRF attacks if configured incorrectly. However, modern security features combined with HTTPS and proper server-side validation, make them a highly secure choice.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;The Store&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now, we found our best way for storing the required user data, the cookies. But, we can't everytime, take the token from the cookie, decode it and then take the details and provide it to a component. Hence, we need a central store which works as the common source of truth across the website for different items.&lt;/p&gt;

&lt;p&gt;For this central store, you can use Redux or Zustand, the best two state management libraries out in the dev world. I personally prefer Zustand, cause of it's easier syntax, and some other advantages.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Making Everything Work Together&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now comes the interesting part. We have:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;User data stored securely inside an HttpOnly cookie.&lt;/li&gt;
&lt;li&gt;A central store (Redux/Zustand) that components can access.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But how do we connect these two? And the answer is hydration.&lt;/p&gt;

&lt;p&gt;Whenever a user reloads the page, the in-memory store is completely reset, because Zustand and Redux stores live inside the browser's memory. Once the page refreshes, all that data disappears.&lt;/p&gt;

&lt;p&gt;To solve this, we create an endpoint, usually something like /api/me. This endpoint acts as a trusted server-side layer that verifies the token before exposing user information to the frontend.&lt;/p&gt;

&lt;p&gt;On every application load, an authentication hook runs automatically and calls this endpoint.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;useEffect(() =&amp;gt; {
    fetch("/api/me");
}, []);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, what happens inside /api/me?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The browser automatically attaches the HttpOnly cookie.&lt;/li&gt;
&lt;li&gt;The server reads the cookie.&lt;/li&gt;
&lt;li&gt;The JWT signature is verified.&lt;/li&gt;
&lt;li&gt;The token payload is decoded.&lt;/li&gt;
&lt;li&gt;User information is extracted.&lt;/li&gt;
&lt;li&gt;The user object is returned to the frontend.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And hence in this way, we don't query the database, as all the essential information required by the frontend already exists inside the JWT payload. The server simply verifies the token, extracts the information, and sends it back.&lt;/p&gt;

&lt;p&gt;Once the response reaches the frontend, we hydrate our store. And, now the store contains the latest user information and becomes the single source of truth for the entire application.&lt;/p&gt;

&lt;p&gt;Any component that needs user information can simply subscribe to the store. Whether it's the Navbar, Profile page, Dashboard, Settings page, or any future component, everyone reads from the same store instead of making separate API requests.&lt;/p&gt;

&lt;p&gt;This gives us three major benefits:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Better performance because we avoid repeated requests.&lt;/li&gt;
&lt;li&gt;Cleaner code because all user information comes from one place.&lt;/li&gt;
&lt;li&gt;Consistent UI because every component sees the same data.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The complete flow looks like this:&lt;/p&gt;

&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%2F99t8dcgt5zjxlgyvtwz8.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%2F99t8dcgt5zjxlgyvtwz8.png" alt="Working" width="800" height="439"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And that's how modern web applications keep user information available across the entire application without querying the database on every page reload.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Things To Check Out&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Zustand - &lt;a href="https://zustand.docs.pmnd.rs/learn/getting-started/introduction" rel="noopener noreferrer"&gt;https://zustand.docs.pmnd.rs/learn/getting-started/introduction&lt;/a&gt;&lt;br&gt;
Redux - &lt;a href="https://redux.js.org/introduction/getting-started" rel="noopener noreferrer"&gt;https://redux.js.org/introduction/getting-started&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Hope, I didn't bore you and helped you understand something new regarding frontend 😊. And hopefully, you now realize that frontend is much more than just moving elements around the screen 😂.&lt;/p&gt;

&lt;p&gt;See you in the next blog, with some new frontend topic...&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Lies on Frontend</title>
      <dc:creator>Kushal Rathod</dc:creator>
      <pubDate>Sat, 13 Jun 2026 10:14:30 +0000</pubDate>
      <link>https://dev.to/thecodster/lies-on-frontend-4d12</link>
      <guid>https://dev.to/thecodster/lies-on-frontend-4d12</guid>
      <description>&lt;p&gt;Hey 👋&lt;/p&gt;

&lt;p&gt;So, this is my first blog on this platform, actually, my first blog anywhere 🙃. And since I have a keen interest in Frontend, you'll mostly find my yaps around that only. Yeah, I call my blogs "yaps" (just me things).&lt;/p&gt;

&lt;p&gt;So what's a better way to start writing than talking about one of the biggest lies I've heard throughout engineering?&lt;/p&gt;

&lt;p&gt;"Frontend is dead."&lt;/p&gt;




&lt;p&gt;I have friends who work on backend and low-level stuff. I'll mention some of them at the end - do check them out if backend is your thing (not a paid PR 😂). But honestly? Those things never really interested me. While, Frontend always did.&lt;/p&gt;

&lt;p&gt;Whether it was learning JavaScript internals, understanding how rendering works, or building UI components that actually feel good to use, frontend was one of the few things in engineering that genuinely kept me curious.&lt;/p&gt;

&lt;p&gt;And because of that, I decided that this is the direction I want to build my career in. But then people around you start saying things.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"Bruh, Frontend? It's 2026. Wake up."&lt;/li&gt;
&lt;li&gt;Your YouTube feed starts recommending videos titled: "Frontend is DEAD."&lt;/li&gt;
&lt;li&gt;Some professors say things like:
"If you just want to do frontend and join a company, then why are you even doing engineering?"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And after hearing enough of these things, there was a point where even I started questioning myself. Like, Really? Frontend?&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Two Things Before We Continue&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you've heard similar things and you're tired of listening to them, do these two things:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Listen to this song 🎵&lt;br&gt;
Kuch to log kahenge, logon ka kaam hai kehna.&lt;br&gt;
(People will say things. It's their job to do so.)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Continue reading 😌&lt;br&gt;
Because I have a few things to say.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;&lt;strong&gt;Frontend Isn't Dead&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you're still reading, let me try to convince you that choosing frontend isn't some terrible career decision. First of all, companies like Microsoft, Uber, and many others aren't crazy. They still hire frontend engineers. They have Frontend SDE-II roles, Senior, Staff and Principal Frontend roles.&lt;/p&gt;

&lt;p&gt;If frontend were truly dead, these positions wouldn't exist. Now yes, one thing is true. Frontend roles have slowly shifted towards full-stack expectations. Companies often expect engineers to understand the entire flow—from UI to APIs to databases. But that doesn't mean you need to become a backend wizard who can design distributed systems in their sleep.&lt;/p&gt;

&lt;p&gt;I do think everyone should learn some backend. And by some backend, I don't mean just making one Express server and calling it a day. Understand APIs. Understand databases. Understand caching. Understand queues. Understand how systems scale. Even though you don't go much deep, but you need to know them.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Frontend Is Just Moving Buttons&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now let's talk about my favorite lie.&lt;/p&gt;

&lt;p&gt;"Frontend is just moving buttons around."&lt;/p&gt;

&lt;p&gt;Bruhhhh 😭. If that's what frontend is, then yeah, Frontend is dead. Because even AI can generate that. But frontend is much more than that. There's:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Performance optimization&lt;/li&gt;
&lt;li&gt;SEO&lt;/li&gt;
&lt;li&gt;Rendering strategies&lt;/li&gt;
&lt;li&gt;Frontend caching&lt;/li&gt;
&lt;li&gt;State management&lt;/li&gt;
&lt;li&gt;Accessibility&lt;/li&gt;
&lt;li&gt;Testing&lt;/li&gt;
&lt;li&gt;Bundle optimization&lt;/li&gt;
&lt;li&gt;Web security&lt;/li&gt;
&lt;li&gt;Architecture decisions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And a lot more.&lt;/p&gt;

&lt;p&gt;A frontend engineer might spend days improving page load times by a few hundred milliseconds. Reducing bundle size. Optimizing React renders. Improving Core Web Vitals. Designing a caching strategy. Making sure an application works for thousands or millions of users. That's not "moving buttons." That's engineering.&lt;/p&gt;

&lt;p&gt;And if you look at most frontend job descriptions, you'll notice these are exactly the things companies care about.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;What I Think Every Frontend Developer Should Learn&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;My opinion?&lt;/p&gt;

&lt;p&gt;Learn some backend. Not because frontend is dying. Because understanding the entire system makes you a better frontend engineer. Learn frontend system design too. And yes, Frontend system design is a real thing 🙃. System design doesn't automatically mean databases, load balancers, and microservices.&lt;/p&gt;

&lt;p&gt;Learn how large frontend applications are structured. Learn state management. Learn performance. Learn rendering. Learn architecture.&lt;/p&gt;

&lt;p&gt;And of course, work with AI. But don't blindly copy-paste everything it gives you. Make AI work for you and not the other way around.&lt;/p&gt;

&lt;p&gt;And never leave the fundamentals. Whether it's JavaScript, React, browser internals, networking, or performance. The fundamentals are still undefeated.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Final Yap&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If someone tells you frontend is dead, send them this blog 😌.&lt;/p&gt;

&lt;p&gt;And if frontend is something that genuinely excites you, don't abandon it because a random YouTube thumbnail told you to. Learn it properly. Go deeper than just components and styling. Understand the engineering behind it. And most importantly, build stuff. A lot of stuff.&lt;/p&gt;

&lt;p&gt;Also, wait for more yaps 👀. They won't be motivational posts 😂. But, instead I will talk about actual frontend things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;JavaScript internals&lt;/li&gt;
&lt;li&gt;Debouncing&lt;/li&gt;
&lt;li&gt;Event loop&lt;/li&gt;
&lt;li&gt;Rendering&lt;/li&gt;
&lt;li&gt;Performance&lt;/li&gt;
&lt;li&gt;Browser magic&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And hopefully make them interesting enough that you don't fall asleep halfway through.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;If Backend Is Your Thing&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you're into backend, low-level systems, databases, or backend system design, check out:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://keep-alives.hashnode.dev/" rel="noopener noreferrer"&gt;https://keep-alives.hashnode.dev/&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;THANKS for reading the first YAPPPPPP ❤️&lt;/p&gt;

</description>
      <category>frontend</category>
      <category>development</category>
    </item>
    <item>
      <title>CodeCoach — A new way of practicing codeforces</title>
      <dc:creator>Kushal Rathod</dc:creator>
      <pubDate>Fri, 16 Jan 2026 20:05:41 +0000</pubDate>
      <link>https://dev.to/thecodster/codecoach-a-new-way-of-practicing-codeforces-4a9</link>
      <guid>https://dev.to/thecodster/codecoach-a-new-way-of-practicing-codeforces-4a9</guid>
      <description>&lt;p&gt;Hi coders, hope you all are coding well. I am Kushal (or TheCodster) and wanted to share something with you all.&lt;/p&gt;

&lt;p&gt;So, I have not been much into CP, but what I have seen is people practicing random topics or sheets for improving themselves. But I believe why solve any random questions, and not just practice what is required. Hence, after talking to my peers, I thought of building CodeCoach.&lt;/p&gt;

&lt;p&gt;CodeCoach is an open-source platform, aimed to improve your skills where you lack. Just, select the topics, your rating, and the daily questions limit, and boom, you are done. You will receive daily questions but not at a fixed time, instead whenever you login and get the questions, from that time, the 24 hour clock will start. You can build your streak, track your stats and more.&lt;/p&gt;

&lt;p&gt;It's still an evolving platform, where you can also contribute, and make it grow, as it will help our coder's community only. Please do give it a look, and share your response, like how was the idea, any bugs on the website, what more should be added and more. Let's build a platform for the community, by the community.&lt;/p&gt;

&lt;p&gt;Website: &lt;a href="https://codecoach-io.vercel.app" rel="noopener noreferrer"&gt;CodeCoach&lt;/a&gt;&lt;br&gt;
GitHub: &lt;a href="https://github.com/KushalXCoder/codecoach" rel="noopener noreferrer"&gt;github.com/KushalXCoder/codecoach&lt;/a&gt;&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>learning</category>
      <category>coding</category>
    </item>
  </channel>
</rss>
