@@ -157,171 +157,198 @@ external useReducerWithMapState: (
157
157
) => ('state , 'action => unit ) = "useReducer"
158
158
159
159
@module ("react" )
160
- external useEffect : (@uncurry (unit => option <unit => unit >)) => unit = "useEffect"
160
+ external useEffectOnEveryRender : (@uncurry (unit => option <unit => unit >)) => unit = "useEffect"
161
161
@module ("react" )
162
+ external useEffect : (@uncurry (unit => option <unit => unit >), 'deps ) => unit = "useEffect"
163
+ @module ("react" ) @deprecated ("Please use useEffect or useEffectOnEveryRender instead" )
162
164
external useEffect0 : (@uncurry (unit => option <unit => unit >), @as (json ` []` ) _ ) => unit =
163
165
"useEffect"
164
- @module ("react" )
166
+ @module ("react" ) @ deprecated ( "Please use useEffect or useEffectOnEveryRender instead" )
165
167
external useEffect1 : (@uncurry (unit => option <unit => unit >), array <'a >) => unit = "useEffect"
166
- @module ("react" )
168
+ @module ("react" ) @ deprecated ( "Please use useEffect or useEffectOnEveryRender instead" )
167
169
external useEffect2 : (@uncurry (unit => option <unit => unit >), ('a , 'b )) => unit = "useEffect"
168
- @module ("react" )
170
+ @module ("react" ) @ deprecated ( "Please use useEffect or useEffectOnEveryRender instead" )
169
171
external useEffect3 : (@uncurry (unit => option <unit => unit >), ('a , 'b , 'c )) => unit = "useEffect"
170
- @module ("react" )
172
+ @module ("react" ) @ deprecated ( "Please use useEffect or useEffectOnEveryRender instead" )
171
173
external useEffect4 : (@uncurry (unit => option <unit => unit >), ('a , 'b , 'c , 'd )) => unit =
172
174
"useEffect"
173
- @module ("react" )
175
+ @module ("react" ) @ deprecated ( "Please use useEffect or useEffectOnEveryRender instead" )
174
176
external useEffect5 : (@uncurry (unit => option <unit => unit >), ('a , 'b , 'c , 'd , 'e )) => unit =
175
177
"useEffect"
176
- @module ("react" )
178
+ @module ("react" ) @ deprecated ( "Please use useEffect or useEffectOnEveryRender instead" )
177
179
external useEffect6 : (@uncurry (unit => option <unit => unit >), ('a , 'b , 'c , 'd , 'e , 'f )) => unit =
178
180
"useEffect"
179
- @module ("react" )
181
+ @module ("react" ) @ deprecated ( "Please use useEffect or useEffectOnEveryRender instead" )
180
182
external useEffect7 : (
181
183
@uncurry (unit => option <unit => unit >),
182
184
('a , 'b , 'c , 'd , 'e , 'f , 'g ),
183
185
) => unit = "useEffect"
184
186
185
187
@module ("react" )
186
- external useLayoutEffect : (@uncurry (unit => option <unit => unit >)) => unit = "useLayoutEffect"
188
+ external useLayoutEffectOnEveryRender : (@uncurry (unit => option <unit => unit >)) => unit =
189
+ "useLayoutEffect"
187
190
@module ("react" )
191
+ external useLayoutEffect : (@uncurry (unit => option <unit => unit >), 'deps ) => unit =
192
+ "useLayoutEffect"
193
+ @module ("react" ) @deprecated ("Please use useLayoutEffect or useLayoutEffectOnEveryRender instead" )
188
194
external useLayoutEffect0 : (@uncurry (unit => option <unit => unit >), @as (json ` []` ) _ ) => unit =
189
195
"useLayoutEffect"
190
- @module ("react" )
196
+ @module ("react" ) @ deprecated ( "Please use useLayoutEffect or useLayoutEffectOnEveryRender instead" )
191
197
external useLayoutEffect1 : (@uncurry (unit => option <unit => unit >), array <'a >) => unit =
192
198
"useLayoutEffect"
193
- @module ("react" )
199
+ @module ("react" ) @ deprecated ( "Please use useLayoutEffect or useLayoutEffectOnEveryRender instead" )
194
200
external useLayoutEffect2 : (@uncurry (unit => option <unit => unit >), ('a , 'b )) => unit =
195
201
"useLayoutEffect"
196
- @module ("react" )
202
+ @module ("react" ) @ deprecated ( "Please use useLayoutEffect or useLayoutEffectOnEveryRender instead" )
197
203
external useLayoutEffect3 : (@uncurry (unit => option <unit => unit >), ('a , 'b , 'c )) => unit =
198
204
"useLayoutEffect"
199
- @module ("react" )
205
+ @module ("react" ) @ deprecated ( "Please use useLayoutEffect or useLayoutEffectOnEveryRender instead" )
200
206
external useLayoutEffect4 : (@uncurry (unit => option <unit => unit >), ('a , 'b , 'c , 'd )) => unit =
201
207
"useLayoutEffect"
202
- @module ("react" )
208
+ @module ("react" ) @ deprecated ( "Please use useLayoutEffect or useLayoutEffectOnEveryRender instead" )
203
209
external useLayoutEffect5 : (@uncurry (unit => option <unit => unit >), ('a , 'b , 'c , 'd , 'e )) => unit =
204
210
"useLayoutEffect"
205
- @module ("react" )
211
+ @module ("react" ) @ deprecated ( "Please use useLayoutEffect or useLayoutEffectOnEveryRender instead" )
206
212
external useLayoutEffect6 : (
207
213
@uncurry (unit => option <unit => unit >),
208
214
('a , 'b , 'c , 'd , 'e , 'f ),
209
215
) => unit = "useLayoutEffect"
210
- @module ("react" )
216
+ @module ("react" ) @ deprecated ( "Please use useLayoutEffect or useLayoutEffectOnEveryRender instead" )
211
217
external useLayoutEffect7 : (
212
218
@uncurry (unit => option <unit => unit >),
213
219
('a , 'b , 'c , 'd , 'e , 'f , 'g ),
214
220
) => unit = "useLayoutEffect"
215
221
216
222
@module ("react" )
217
- external useMemo : (@uncurry (unit => 'any )) => 'any = "useMemo"
223
+ external useMemo : (@uncurry (unit => 'any ), 'deps ) => 'any = "useMemo"
218
224
219
- @module ("react" )
225
+ @module ("react" ) @ deprecated ( "Please use useMemo instead" )
220
226
external useMemo0 : (@uncurry (unit => 'any ), @as (json ` []` ) _ ) => 'any = "useMemo"
221
227
222
- @module ("react" )
228
+ @module ("react" ) @ deprecated ( "Please use useMemo instead" )
223
229
external useMemo1 : (@uncurry (unit => 'any ), array <'a >) => 'any = "useMemo"
224
230
225
- @module ("react" )
231
+ @module ("react" ) @ deprecated ( "Please use useMemo instead" )
226
232
external useMemo2 : (@uncurry (unit => 'any ), ('a , 'b )) => 'any = "useMemo"
227
233
228
- @module ("react" )
234
+ @module ("react" ) @ deprecated ( "Please use useMemo instead" )
229
235
external useMemo3 : (@uncurry (unit => 'any ), ('a , 'b , 'c )) => 'any = "useMemo"
230
236
231
- @module ("react" )
237
+ @module ("react" ) @ deprecated ( "Please use useMemo instead" )
232
238
external useMemo4 : (@uncurry (unit => 'any ), ('a , 'b , 'c , 'd )) => 'any = "useMemo"
233
239
234
- @module ("react" )
240
+ @module ("react" ) @ deprecated ( "Please use useMemo instead" )
235
241
external useMemo5 : (@uncurry (unit => 'any ), ('a , 'b , 'c , 'd , 'e )) => 'any = "useMemo"
236
242
237
- @module ("react" )
243
+ @module ("react" ) @ deprecated ( "Please use useMemo instead" )
238
244
external useMemo6 : (@uncurry (unit => 'any ), ('a , 'b , 'c , 'd , 'e , 'f )) => 'any = "useMemo"
239
245
240
- @module ("react" )
246
+ @module ("react" ) @ deprecated ( "Please use useMemo instead" )
241
247
external useMemo7 : (@uncurry (unit => 'any ), ('a , 'b , 'c , 'd , 'e , 'f , 'g )) => 'any = "useMemo"
242
248
243
249
@module ("react" )
244
- external useCallback : 'f => 'f = "useCallback"
250
+ external useCallback : ( 'f , 'deps ) => 'f = "useCallback"
245
251
246
- @module ("react" )
252
+ @module ("react" ) @ deprecated ( "Please use useCallback instead" )
247
253
external useCallback0 : ('f , @as (json ` []` ) _ ) => 'f = "useCallback"
248
254
249
- @module ("react" )
255
+ @module ("react" ) @ deprecated ( "Please use useCallback instead" )
250
256
external useCallback1 : ('f , array <'a >) => 'f = "useCallback"
251
257
252
- @module ("react" )
258
+ @module ("react" ) @ deprecated ( "Please use useCallback instead" )
253
259
external useCallback2 : ('f , ('a , 'b )) => 'f = "useCallback"
254
260
255
- @module ("react" )
261
+ @module ("react" ) @ deprecated ( "Please use useCallback instead" )
256
262
external useCallback3 : ('f , ('a , 'b , 'c )) => 'f = "useCallback"
257
263
258
- @module ("react" )
264
+ @module ("react" ) @ deprecated ( "Please use useCallback instead" )
259
265
external useCallback4 : ('f , ('a , 'b , 'c , 'd )) => 'f = "useCallback"
260
266
261
- @module ("react" )
267
+ @module ("react" ) @ deprecated ( "Please use useCallback instead" )
262
268
external useCallback5 : ('f , ('a , 'b , 'c , 'd , 'e )) => 'f = "useCallback"
263
269
264
- @module ("react" )
265
- external useCallback6 : ('f , ('a , 'b , 'c , 'd , 'e , 'f )) => 'f = "useCallback"
270
+ @module ("react" ) @ deprecated ( "Please use useCallback instead" )
271
+ external useCallback6 : ('callback , ('a , 'b , 'c , 'd , 'e , 'f )) => 'callback = "useCallback"
266
272
267
- @module ("react" )
268
- external useCallback7 : ('f , ('a , 'b , 'c , 'd , 'e , 'f , 'g )) => 'f = "useCallback"
273
+ @module ("react" ) @ deprecated ( "Please use useCallback instead" )
274
+ external useCallback7 : ('callback , ('a , 'b , 'c , 'd , 'e , 'f , 'g )) => 'callback = "useCallback"
269
275
270
276
@module ("react" )
271
277
external useContext : Context .t <'any > => 'any = "useContext"
272
278
273
279
@module ("react" ) external useRef : 'value => ref <'value > = "useRef"
274
280
275
281
@module ("react" )
282
+ external useImperativeHandleOnEveryRender : (
283
+ Js .Nullable .t <ref <'value >>,
284
+ @uncurry (unit => 'value ),
285
+ ) => unit = "useImperativeHandle"
286
+
287
+ @module ("react" )
288
+ external useImperativeHandle : (
289
+ Js .Nullable .t <ref <'value >>,
290
+ @uncurry (unit => 'value ),
291
+ 'deps ,
292
+ ) => unit = "useImperativeHandle"
293
+
294
+ @module ("react" )
295
+ @deprecated ("Please use useImperativeHandle or useImperativeHandleOnEveryRender instead" )
276
296
external useImperativeHandle0 : (
277
297
Js .Nullable .t <ref <'value >>,
278
298
@uncurry (unit => 'value ),
279
299
@as (json ` []` ) _ ,
280
300
) => unit = "useImperativeHandle"
281
301
282
302
@module ("react" )
303
+ @deprecated ("Please use useImperativeHandle or useImperativeHandleOnEveryRender instead" )
283
304
external useImperativeHandle1 : (
284
305
Js .Nullable .t <ref <'value >>,
285
306
@uncurry (unit => 'value ),
286
307
array <'a >,
287
308
) => unit = "useImperativeHandle"
288
309
289
310
@module ("react" )
311
+ @deprecated ("Please use useImperativeHandle or useImperativeHandleOnEveryRender instead" )
290
312
external useImperativeHandle2 : (
291
313
Js .Nullable .t <ref <'value >>,
292
314
@uncurry (unit => 'value ),
293
315
('a , 'b ),
294
316
) => unit = "useImperativeHandle"
295
317
296
318
@module ("react" )
319
+ @deprecated ("Please use useImperativeHandle or useImperativeHandleOnEveryRender instead" )
297
320
external useImperativeHandle3 : (
298
321
Js .Nullable .t <ref <'value >>,
299
322
@uncurry (unit => 'value ),
300
323
('a , 'b , 'c ),
301
324
) => unit = "useImperativeHandle"
302
325
303
326
@module ("react" )
327
+ @deprecated ("Please use useImperativeHandle or useImperativeHandleOnEveryRender instead" )
304
328
external useImperativeHandle4 : (
305
329
Js .Nullable .t <ref <'value >>,
306
330
@uncurry (unit => 'value ),
307
331
('a , 'b , 'c , 'd ),
308
332
) => unit = "useImperativeHandle"
309
333
310
334
@module ("react" )
335
+ @deprecated ("Please use useImperativeHandle or useImperativeHandleOnEveryRender instead" )
311
336
external useImperativeHandle5 : (
312
337
Js .Nullable .t <ref <'value >>,
313
338
@uncurry (unit => 'value ),
314
339
('a , 'b , 'c , 'd , 'e ),
315
340
) => unit = "useImperativeHandle"
316
341
317
342
@module ("react" )
343
+ @deprecated ("Please use useImperativeHandle or useImperativeHandleOnEveryRender instead" )
318
344
external useImperativeHandle6 : (
319
345
Js .Nullable .t <ref <'value >>,
320
346
@uncurry (unit => 'value ),
321
347
('a , 'b , 'c , 'd , 'e , 'f ),
322
348
) => unit = "useImperativeHandle"
323
349
324
350
@module ("react" )
351
+ @deprecated ("Please use useImperativeHandle or useImperativeHandleOnEveryRender instead" )
325
352
external useImperativeHandle7 : (
326
353
Js .Nullable .t <ref <'value >>,
327
354
@uncurry (unit => 'value ),
@@ -336,34 +363,45 @@ external useImperativeHandle7: (
336
363
external useTransition : unit => (bool , (. unit => unit ) => unit ) = "useTransition"
337
364
338
365
@module ("react" )
339
- external useInsertionEffect : (@uncurry (unit => option <unit => unit >)) => unit =
366
+ external useInsertionEffectOnEveryRender : (@uncurry (unit => option <unit => unit >)) => unit =
340
367
"useInsertionEffect"
341
368
@module ("react" )
369
+ external useInsertionEffect : (@uncurry (unit => option <unit => unit >), 'deps ) => unit =
370
+ "useInsertionEffect"
371
+ @module ("react" )
372
+ @deprecated ("Please use useInsertionEffect or useInsertionEffectOnEveryRender instead" )
342
373
external useInsertionEffect0 : (@uncurry (unit => option <unit => unit >), @as (json ` []` ) _ ) => unit =
343
374
"useInsertionEffect"
344
375
@module ("react" )
376
+ @deprecated ("Please use useInsertionEffect or useInsertionEffectOnEveryRender instead" )
345
377
external useInsertionEffect1 : (@uncurry (unit => option <unit => unit >), array <'a >) => unit =
346
378
"useInsertionEffect"
347
379
@module ("react" )
380
+ @deprecated ("Please use useInsertionEffect or useInsertionEffectOnEveryRender instead" )
348
381
external useInsertionEffect2 : (@uncurry (unit => option <unit => unit >), ('a , 'b )) => unit =
349
382
"useInsertionEffect"
350
383
@module ("react" )
384
+ @deprecated ("Please use useInsertionEffect or useInsertionEffectOnEveryRender instead" )
351
385
external useInsertionEffect3 : (@uncurry (unit => option <unit => unit >), ('a , 'b , 'c )) => unit =
352
386
"useInsertionEffect"
353
387
@module ("react" )
388
+ @deprecated ("Please use useInsertionEffect or useInsertionEffectOnEveryRender instead" )
354
389
external useInsertionEffect4 : (@uncurry (unit => option <unit => unit >), ('a , 'b , 'c , 'd )) => unit =
355
390
"useInsertionEffect"
356
391
@module ("react" )
392
+ @deprecated ("Please use useInsertionEffect or useInsertionEffectOnEveryRender instead" )
357
393
external useInsertionEffect5 : (
358
394
@uncurry (unit => option <unit => unit >),
359
395
('a , 'b , 'c , 'd , 'e ),
360
396
) => unit = "useInsertionEffect"
361
397
@module ("react" )
398
+ @deprecated ("Please use useInsertionEffect or useInsertionEffectOnEveryRender instead" )
362
399
external useInsertionEffect6 : (
363
400
@uncurry (unit => option <unit => unit >),
364
401
('a , 'b , 'c , 'd , 'e , 'f ),
365
402
) => unit = "useInsertionEffect"
366
403
@module ("react" )
404
+ @deprecated ("Please use useInsertionEffect or useInsertionEffectOnEveryRender instead" )
367
405
external useInsertionEffect7 : (
368
406
@uncurry (unit => option <unit => unit >),
369
407
('a , 'b , 'c , 'd , 'e , 'f , 'g ),
@@ -401,31 +439,31 @@ module Uncurried = {
401
439
) => ('state , (. 'action ) => unit ) = "useReducer"
402
440
403
441
@module ("react" )
404
- external useCallback : 'f => 'f = "useCallback"
442
+ external useCallback : ( 'f , 'deps ) => 'f = "useCallback"
405
443
406
- @module ("react" )
444
+ @module ("react" ) @ deprecated ( "Please use useCallback instead" )
407
445
external useCallback0 : ('f , @as (json ` []` ) _ ) => 'f = "useCallback"
408
446
409
- @module ("react" )
447
+ @module ("react" ) @ deprecated ( "Please use useCallback instead" )
410
448
external useCallback1 : ('f , array <'a >) => 'f = "useCallback"
411
449
412
- @module ("react" )
450
+ @module ("react" ) @ deprecated ( "Please use useCallback instead" )
413
451
external useCallback2 : ('f , ('a , 'b )) => 'f = "useCallback"
414
452
415
- @module ("react" )
453
+ @module ("react" ) @ deprecated ( "Please use useCallback instead" )
416
454
external useCallback3 : ('f , ('a , 'b , 'c )) => 'f = "useCallback"
417
455
418
- @module ("react" )
456
+ @module ("react" ) @ deprecated ( "Please use useCallback instead" )
419
457
external useCallback4 : ('f , ('a , 'b , 'c , 'd )) => 'f = "useCallback"
420
458
421
- @module ("react" )
459
+ @module ("react" ) @ deprecated ( "Please use useCallback instead" )
422
460
external useCallback5 : ('f , ('a , 'b , 'c , 'd , 'e )) => 'f = "useCallback"
423
461
424
- @module ("react" )
425
- external useCallback6 : ('f , ('a , 'b , 'c , 'd , 'e , 'f )) => 'f = "useCallback"
462
+ @module ("react" ) @ deprecated ( "Please use useCallback instead" )
463
+ external useCallback6 : ('callback , ('a , 'b , 'c , 'd , 'e , 'f )) => 'callback = "useCallback"
426
464
427
- @module ("react" )
428
- external useCallback7 : ('f , ('a , 'b , 'c , 'd , 'e , 'f , 'g )) => 'f = "useCallback"
465
+ @module ("react" ) @ deprecated ( "Please use useCallback instead" )
466
+ external useCallback7 : ('callback , ('a , 'b , 'c , 'd , 'e , 'f , 'g )) => 'callback = "useCallback"
429
467
}
430
468
431
469
@set
0 commit comments