Ako dať typ na createAsyyncthunk

Príklady kódu

0
0

ako dať typ na createAsyyncthunk

createAsyncThunk<param1,param2,param3>

the first type-parameter
to tell what type will be returned as a result.

The second type-parameter in `createAsyncThunk`
 tells what argument takes the function inside:
 
 The third type-parameter is an object with:
 `{dispatch?, state?, extra?, rejectValue?}`` fields.

`extra` is useful when we need to pass 
 some static data to the request function,
 like jwt-token or HTTP-headers.

 `rejectValue` is useful when we need to type 
 possible errors.

Podobné stránky

Podobné stránky s príkladmi

V iných jazykoch

Táto stránka je v iných jazykoch

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................