Skip to content

Instantly share code, notes, and snippets.

View henriquesosa's full-sized avatar
🏠
Working from home

Henrique Sosa henriquesosa

🏠
Working from home
View GitHub Profile
import React from 'react';
export function setState(newState) {
this.state = { ...this.state, ...newState };
this.listeners.forEach((listener) => {
listener(this.state);
});
}
export function useCustom() {