adobe / adobe/react-spectrum

[`@react-stately/data`]: Support `initialItems` for `useAsyncList`

Open
#3,797 2 comments 3 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
15.9k
Forks
1.6k
Avg merge
3d 9m
Merged PRs (30d)
59

Description

# 🙋 Feature Request

An option to support `initialItems` would be useful when using Next.js and preloaded data

## 🤔 Expected Behavior

There should be a smooth transition when using preloaded data and `useAsyncList().items`

## 😯 Current Behavior

Currently there's a blank spot when switching from preloaded data to the list items (see video):

https://user-images.githubusercontent.com/53900565/204584457-49f8bbb1-39f2-4dc3-8170-e9c532294899.mp4

## 💁 Possible Solution

Support `initialItems` like in `useDataList` and `useTreeList`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.