_about-me

// personal-info / bio

Experienced Full Stack web developer and team lead with experience in the gambling industry. Strong understanding of modern technologies with an eye for clean architecture. Passionate about javascript and solving problems using technology and collaboration. I work with Angular, nodejs, mongodb and most popular Git frameworks and libraries. I enjoy writing clean code that helps developers to improve their day-to-day workflow and create intuitive interfaces.

// Code snippet showcase:

@mikediamanto

useDebouncedValue.ts

export function useDebouncedValue<T>(value: T, delay = 300): T {  const [debounced, setDebounced] = useState(value);  useEffect(() => {    const id = setTimeout(() => setDebounced(value), delay);    return () => clearTimeout(id);  }, [value, delay]);  return debounced;}

@mikediamanto

createEventBus.ts

export function createEventBus<Events extends Record<string, unknown>>() {  const handlers = new Map<keyof Events, Set<(payload: never) => void>>();  return {    on<K extends keyof Events>(event: K, fn: (payload: Events[K]) => void) {      if (!handlers.has(event)) handlers.set(event, new Set());      handlers.get(event)!.add(fn);      return () => handlers.get(event)!.delete(fn);    },    emit<K extends keyof Events>(event: K, payload: Events[K]) {      handlers.get(event)?.forEach((fn) => fn(payload as never));    },  };}