Lokesh Sharma.

Blogs

Explore my latest musings and in-depth articles on various subjects, including MERN stack development, software engineering best practices, and industry insights.


  • Understanding QueryClient Initialization in React Query: Best Practices and Pitfalls

    Understanding QueryClient Initialization in React Query: Best Practices and Pitfalls

    The 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 },...

    • react-query
    • React
    • tanstack-query
  • Correct Way to Write Code Comments

    Correct Way to Write Code Comments

    Writing 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...

    • code comments
    • coding
    • Programming basics
  • 10+ Open Source Alternatives to Your Favorite Software and Apps 🔥👨‍💻

    10+ 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...

    • Open Source
    • #freesoftware
    • Productivity
  • Building a RESTful API with Express and MongoDB

    Building a RESTful API with Express and MongoDB

    The 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 ...

    • REST API
    • Express
    • mongoose
  • Level Up Your TypeScript: A Guide to Built-in Types

    Level Up Your TypeScript: A Guide to Built-in Types

    TypeScript, 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 ...

    • TypeScript
    • typescript types
    • JavaScript
  • Validate forms with NextJS 14, typescript, and Zod

    Validate forms with NextJS 14, typescript, and Zod

    Next.js 14, with its emphasis on efficiency and developer experience, makes an excellent platform for developing modern web apps. However, ensuring user input validity is critical to providing a satisfactory user experience. This blog article discuss...

    • nextjs 14
    • TypeScript
    • zod