Typecript: Overloading functions with tuplesOverloading a function on a programming language means using the same function but with different types of arguments or increasing the number of arguments. What are tuples? Is a mechanism in typescript to strictly define an Array, define size, define...Apr 24, 2022 路 3 min readalecode.hashnode.dev
Avoiding unexpected calls from useEffect on re-renders with useCallback and useRef approachesThe practice of put in place useCallback https://reactjs.org/docs/hooks-reference.html#usecallback is useful because guarantees that a function won't change unless its dependencies change, and making sure we can pass down that function to any other ...Sep 19, 2021 路 3 min readalecode.hashnode.dev
NextJS Intl: Mixed-up markup translationsToday will talk about how to handle complex translations with HTML elements in the middle with NextJS Intl . Prerequisites Would assume you have heard already about NextJS Intl or a similar library. If not, take a look at the link added previously. ...Aug 17, 2021 路 1 min readalecode.hashnode.dev
Illustrating: The power behind JS Array.reducerArray API during the latest years is becoming more and more powerful, there are a lot of useful functions that we can rely on every day, but one that has many use cases when transforming arrays into other types: objects, strings, numbers and you cont...Aug 2, 2021 路 2 min readalecode.hashnode.dev
Use Cases: Lazy Loading with React SuspenseLazy loading is an approach to load incrementally parts 馃殌 of your app, these could be a route component that is not used often or even a component that depends on heavy dependencies, we'll focus on these 2 use cases. FYI: there is part of this API...Jul 22, 2021 路 2 min readalecode.hashnode.dev