[preact/debug] false positive complain about memoization
See original GitHub issueReproduction
Libraries:
- preact
10.4.8
Steps to reproduce
Press here to see an example.
Dynamic dependencies of memoized calculations through useMemo/useCallback
result in a false positive complain about memoization.
Expected Behavior
Dynamic dependencies shouldn’t result in a console’s complain.
Actual Behavior
False positive complain.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Memoization Forget-Me-Bomb. Remember it? No! - ITNEXT
That means that they are 1) not fast 2) not safe 3) could produce false positives — some different data could have the...
Read more >You're overusing useMemo: Rethinking Hooks memoization
In some cases, useMemo is irrelevant, overused, and harmful to your application performance. Learn these situations and how to avoid them.
Read more >Writing Resilient Components - Overreacted
Statically analyzing calls from componentDidMount and componentDidUpdate is fraught with false positives. However, one could design an API that ...
Read more >The 10 Most Common JavaScript Issues Developers Face
Makes debugging easier. Code errors that would otherwise have been ignored or would have failed silently will now generate errors or throw exceptions,...
Read more >What are your favorite interview questions for a senior React ...
I think instead of react-specific questions, system design questions make more sense ... that one generated a lot of false positives for me, ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
No.
Yes 👍
@afzalsayed96 remove that check in
preact/debug
. My understanding is that linters can/should take care of that already and linter rules can be easily ignored on a case-by-case basis.