danijelmaksimovic.comHow to test React Router components?Every React app I had worked with used react-router. There isn't much sense in having an application without it. In this article, we will be looking at how to test the component that is doing the navigation and why mocking React Router's APIs isn't t...Nov 7, 2023·4 min read
danijelmaksimovic.comYou should repeat yourself when writing testsHow would you react if I would say you should duplicate code when writing tests? You would probably think I don't know what I'm talking about and that I will be breaking one of the most followed principles in software development, the DRY principle. ...Aug 15, 2023·4 min read
danijelmaksimovic.comTypeScript utility types I use the mostTypeScript comes with a lot of built-in types that can be used for extracting, converting, or manipulating types in many ways. We are going to cover the ones I use the most and we will go through them in a Q&A fashion. How do I pick a couple of prope...May 23, 2023·6 min read
danijelmaksimovic.comMy thoughts on HasuraI've been using Hasura for the more significant part of the year, working every day with it. It's marketed as a BaaS (backend as a service), which means that it exposes a GraphQL API for you from some data source (DB, Rest API, other GraphQL). It's o...Oct 31, 2022·3 min read
danijelmaksimovic.comDerived state in ReactWhat is a derived state? A derived state is a value that is computed from a state value. For example: import React from 'react' const Example: React.FC = () => { const [counter, setCounter] = useState(0) const doubleCounter = counter * 2 r...Oct 7, 2022·2 min read