emilov2501 / use-ui

Simple React hooks, ready to use, written in TypeScript
MIT License
11 stars 0 forks source link

Incapsulate subscribe-notify logic for listeners to an Observer-like pattern #1

Open sachyshyn opened 6 months ago

sachyshyn commented 6 months ago

https://github.com/emilov2501/use-ui/blob/6aaa21feb2c2d29a1b677514cb025e3dd57e8acc/packages/use-ui/lib/useToast/useToast.ts#L18

You're using this logic in several places, its better to reuse it using class instantiating or factory / hooks

emilov2501 commented 6 months ago

@sachyshyn thanks for watching, fixed in patch 1.4.0