Daviichii89 / manga-collection

App similar a Whakoom
https://manga-collection.surge.sh/
0 stars 0 forks source link

Warning TS in MangaDetail.tsx #10

Closed Daviichii89 closed 11 months ago

Daviichii89 commented 11 months ago

I don't understand why throws this warning when I think that the mangasCollection variable is typed correctly and the store also.

Code: image

Error: image

danielart commented 11 months ago

For this kind of errors, the error stream is not enough, usually you add the code that trigger this error

Daviichii89 commented 11 months ago

I see the problem. I thought the problem was in the mangasCollection variable and its type, but the problem was in the initialState interface of the collectionReducer or in the initial state value. In this case I have opted to change the typing of initialState.

From: image

To: image