lokeshkavisth.hashnode.devUnderstanding QueryClient Initialization in React Query: Best Practices and PitfallsThe Two Approaches Let's examine two common approaches to initializing QueryClient: // Approach 1: Using useState const [queryClient] = useState(() => new QueryClient({ defaultOptions: { queries: { staleTime: 60 * 1000, // 1 minute },...Jan 15, 2025·3 min read
lokeshkavisth.hashnode.devCorrect Way to Write Code CommentsWriting good code is not just about making it functional—it's also about making it readable and maintainable. One of the best tools for improving code readability is comments. But what is the correct way to write code comments? Let's explore best pra...Sep 7, 2024·4 min read
lokeshkavisth.hashnode.dev10+ Open Source Alternatives to Your Favorite Software and Apps 🔥👨💻In today's digital world, we rely heavily on software and apps for everything from work to entertainment. However, many popular programs come with hefty price tags or raise privacy concerns. This is where open-source software comes to the rescue! Ope...Aug 25, 2024·5 min read
lokeshkavisth.hashnode.devBuilding a RESTful API with Express and MongoDBThe MERN stack, which includes MongoDB, Express, React, and Node.js, offers a reliable and quick solution to create modern web apps. In this post, we'll look at how to create a RESTful API with Express and MongoDB, the backend components of the MERN ...Jun 4, 2024·5 min read
lokeshkavisth.hashnode.devLevel Up Your TypeScript: A Guide to Built-in TypesTypeScript, a superset of JavaScript, provides developers with static typing capabilities. This means you specify the data types that your variables and functions will accept, which improves code clarity, maintainability, and catches errors early in ...Apr 5, 2024·2 min read