Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace onPlaceholderData with onInitialData #68

Merged
merged 1 commit into from
Aug 18, 2024
Merged

Conversation

ogaclejapan
Copy link
Contributor

I have renamed onPlaceholderData to onInitialData and shifted its role to that of an initial data set. We have decided to redesign the placeholder to be applied on a component basis in the future.

Background

In the TanStack Query, which we reference as a benchmark, it is designed to be used differently according to the application.

The onPlaceholderData implemented in Soil Query did not align perfectly with either, having a position somewhat in between. From a usability perspective, it was deemed preferable to align the role more closely with Initial Query Data, and to prepare a new implementation for the placeholder.

Feature Scope Cache
Soil - onPlaceholderData cache level skip
TanStack - initialData cache level save
TanStack - placeholderData observer level -

I have renamed `onPlaceholderData` to `onInitialData` and shifted its role to that of an initial data set. We have decided
to redesign the placeholder to be applied on a component basis in the future.

In the TanStack Query, which we reference as a benchmark, it is designed to be used differently according to the
application.

- [Initial Query Data](https://tanstack.com/query/latest/docs/framework/react/guides/initial-query-data)
- [Placeholder Query Data](https://tanstack.com/query/latest/docs/framework/react/guides/placeholder-query-data)

The `onPlaceholderData` implemented in Soil Query did not align perfectly with either, having a position somewhat in
between. From a usability perspective, it was deemed preferable to align the role more closely with Initial Query Data,
and to prepare a new implementation for the placeholder.
@ogaclejapan ogaclejapan added the breaking-change Breaking Changes label Aug 18, 2024
@ogaclejapan ogaclejapan merged commit e356dfa into main Aug 18, 2024
1 check passed
@ogaclejapan ogaclejapan deleted the initial-data branch August 18, 2024 01:31
@github-actions github-actions bot mentioned this pull request Sep 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change Breaking Changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant