This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Renders a list of items from an array. If the array is empty, renders the | |
* `fallback` if provided. | |
* | |
* @param {Array<T>} each The array of items to render. | |
* @param {ReactNode} fallback An optional element to render if the array is empty. | |
* @param {(item: T, index: number) => U} children A function that takes an item and its index and returns a React element. | |
* | |
* @example | |
* ```tsx |