Skip to content

Instantly share code, notes, and snippets.

View victorcolina22's full-sized avatar
馃殌
Focusing

Victor Colina victorcolina22

馃殌
Focusing
View GitHub Profile

Deep compare function in TypeScript

export const deepCompare = (objA: any, objB: any) => {
	if (objA === objB) return true; // Misma referencia o valores primitivos

	if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
		return false; // Ning煤n objeto es null
	}

Custom hook for React to manage form states

Install TanStack Query to properly use

npm i @tanstack/react-query

Also you need to copy and paste this function in your project to enable the comparation

export const deepCompare = (objA: any, objB: any) => {
@victorcolina22
victorcolina22 / doc.md
Last active January 3, 2026 15:17
Crea tu propio Pie Chart con React + TypeScript + TailwindCSS