#Aver muestre el countrylist

1 messages · Page 1 of 1 (latest)

tardy viper
#

Hola

#

reactjs con typescript

lyric fox
#

muestrame el RootState

#

y el reducer

tardy viper
lyric fox
#

revisame ese createAsyncThunk

#

y tu initialstate no puede ser un objeto

#

debe ser un array

tardy viper
#

tipo never[]

lyric fox
tardy viper
#

const initialState = { data: []};

#

si cambio

lyric fox
#

countryList?.data?.map

tardy viper
#

ooh si funciono

#

es extraño

#

una consulta

lyric fox
#

una terapia

#

digo mande

tardy viper
lyric fox
#

mmm

#

revisa de que tipos son

#

o es el payload o el state

#

alguno no concuerda con el tipo

#

h

#

ah

#

tipea el

#

const initialState= {

#

data:[] as CountryAPI[]

#

}4

tardy viper
#

aaah

#

dos agrega CountryAPI en axios.get<CountryAPI[]> y initialState

#

si funciono

#

gracias maestro

tardy viper
#

Hola