andywer / use-inline-memo

⚛️ React hook for memoizing values inline anywhere in a component
164 stars 3 forks source link

Question: will useInlineMemo clear useless caches after each rerender? #8

Open zhaoyao91 opened 4 years ago

zhaoyao91 commented 4 years ago

userInlineMemo is great for static inline memos, but how about dynamic items with random id?

Say, user create and delete items with random ids, if I use this lib to memo callbacks of each item with their ids, when some items were gone, will these callbacks get removed from the caches inside the memo object?