Chrome Extension

Get index in map React

function items() {
    const nums = [1, 2, 3, 4];
    return <div>
        { (num, index) => 
            <div key={index.toString()}>{num}</div>
We are a bunch of lazy programmers so we developed this chrome extension
search code from your favorite search engine
Install Now

In the map function, you can find the index as its second parameter. 

Was this helpful?
Open Code Manager We are hiring