React Native - CSS :last-child without a border?

前端 未结 2 1193
南方客
南方客 2021-02-11 19:33

In React Native, I have a static array of books that I map over and output in stacked rows like this:

return books.map((book, i) => {
  return(
    

        
2条回答
  •  面向向阳花
    2021-02-11 20:15

    You could achieve this using some logic:

    return books.map((book, i) => {
      return(
        
          {book.title}
        
      );
    });
    

    What this does is check if i, the iterator, is equal to the books array's length - 1.

提交回复
热议问题