DEV Community

Discussion on: Getting started with Typescript with React Hooks

Collapse
 
amaben2020 profile image
amaben2020

Great job. How do I get an array value from an array in typescript? It gives me an error whenever I do this? I really want to modify my state based on the values from that array. Thanks.

Collapse
 
riyanegi profile image
RiyaNegi

I found this stackoverflow answer helpful, Do check it out
!Link

Collapse
 
amaben2020 profile image
amaben2020

Thanks for your reply. I later filtered and mapped the array before applying the .length () to extract the numbers of items and sort data in that category programmatically.