Allow hooks in the expression of a match statement and if statement (#2902)
* Allow hooks in the expression of a match statement and if statement * Don't allow hooks in spawn and detect hooks in initialization closures * Point to DX check when hooks are called conditionally
This commit is contained in:
1 parent
7bb53fe835
commit
c11f2ed3cd
4 files changed
+232
-7
No files matched your search
@@ -424,6 +424,8 @@ impl Scope {
|
||||
|
||||
You likely used the hook in a conditional. Hooks rely on consistent ordering between renders.
|
||||
Functions prefixed with "use" should never be called conditionally.
|
||||
|
||||
Help: Run `dx check` to look for check for some common hook errors.
|
||||
"#,
|
||||
)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user