Tag: programming

  • React: Call Child Functions from Parent Functional Component

    React: Call Child Functions from Parent Functional Component

    In the dynamic world of React development, one question often leads to another, unfolding layers of complexity and elegance in code. Recently, a junior programmer on my team approached me with a seemingly straightforward query: “How can I call child functions from a parent functional component in React?” Another colleague quickly interjected, “You can’t do…

  • Mastering DDD: A Developer’s Guide to Implementing Aggregates

    Mastering DDD: A Developer’s Guide to Implementing Aggregates

    Welcome back to our series on Domain-Driven Design (DDD)! In our previous article, we skimmed the surface of some fundamental DDD concepts like Aggregates, Entities, and Value Objects. If you found that intriguing, buckle up because we’re about to take a deep dive into these core components, specifically through the lens of a developer. While…

  • Getting Started with Domain-Driven Design for Developers

    Getting Started with Domain-Driven Design for Developers

    There are certainly a lot of articles and books about DDD. A several years ago, when I started to learn about it, it took a little time for things to click. At that time, I was really eager to understand DDD from a developer’s perspective, but most of the material was focused on the architectural…

  • JavaScript destructuring nested object and array

    JavaScript destructuring nested object and array

    JavaScript destructuring is a powerful feature that allows developers to extract data from arrays and objects in an elegant and concise way. This technique makes it easier to work with complex data structures and reduces the amount of code required to extract information from these structures. Whether you’re a seasoned JavaScript developer or just starting…

  • How to mock class constructor with parameters- Jest and TypeScript

    How to mock class constructor with parameters- Jest and TypeScript

    Earlier I wrote How to Mock a TypeScript class or dependency using Jest, that is basically a how to auto mock the ES class or module when it comes to typescript. Since it happen to come up on google results, get to see what people search around the subject and “jest mock constructor with parameters…

  • npm package json lock version lockfileVersion:1 or 2? All you need

    npm package json lock version lockfileVersion:1 or 2? All you need

    Now that node.js LTS is change to v16 many team members and even domen cloud providers have not upgraded yet and are still on v12 or v14. Node.js 14 comes with npm version 6 now we are on version 8. The teams having problem with someone messing up the git repo updating npm package json…