Comments (1)
Thank you for your suggestion! I was thinking about that just yesterday and if you dig deeper you’ll discover that dispatch
is essentially useContext(…).store.dispatch
. Contexts are not inherently static, you can literally change the store at runtime in this specific case, and adding them to the “known static values” would produce extremely obscure bugs.
Let me close the issue as wontfix for these reasons, and reopen it if you think I got something wrong.
from hooks.macro.
Related Issues (16)
- Extract indirect dependencies
- Do not inject setState/ref into dependencies HOT 7
- State values with unused setters are known to be static (if const)
- Memoized values with empty inputs array are known to be static
- useAutoUpdateEffect HOT 2
- Not adding dynamic components to dependencies HOT 3
- Feature request: debugChangedDependencies HOT 2
- Create a debug/trace facility
- Support React 17? HOT 5
- Create an escape hatch HOT 2
- Rules for property accesses HOT 9
- Create a generic form HOT 2
- Bail out on constants HOT 1
- Error/warn on known non-invariants
- TypeScript support HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hooks.macro.