@@ -93,7 +93,7 @@ export function useEffect(
93
93
updateDeps ?: Array < mixed > | void | null ,
94
94
destroy ?: ( ( resource : { ...} | void | null ) => void ) | void ,
95
95
) : void {
96
- if ( __DEV__ ) {
96
+ if ( __DEV__ ) {
97
97
if ( create == null ) {
98
98
console . warn (
99
99
'React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?' ,
@@ -126,10 +126,12 @@ export function useInsertionEffect(
126
126
create : ( ) = > ( ( ) => void ) | void ,
127
127
deps : Array < mixed > | void | null ,
128
128
) : void {
129
- if ( __DEV__ && create == null ) {
130
- console . warn (
131
- 'React Hook useInsertionEffect requires an effect callback . Did you forget to pass a callback to the hook ?',
132
- ) ;
129
+ if ( __DEV__ ) {
130
+ if ( create == null ) {
131
+ console . warn (
132
+ 'React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?' ,
133
+ ) ;
134
+ }
133
135
}
134
136
135
137
const dispatcher = resolveDispatcher ( ) ;
@@ -140,10 +142,12 @@ export function useLayoutEffect(
140
142
create : ( ) = > ( ( ) => void ) | void ,
141
143
deps : Array < mixed > | void | null ,
142
144
) : void {
143
- if ( __DEV__ && create == null ) {
144
- console . warn (
145
- 'React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?' ,
146
- ) ;
145
+ if ( __DEV__ ) {
146
+ if ( create == null ) {
147
+ console . warn (
148
+ 'React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?' ,
149
+ ) ;
150
+ }
147
151
}
148
152
149
153
const dispatcher = resolveDispatcher ( ) ;
0 commit comments