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

[Feature]: @suspensive/react-query-next-experimental #1155

Closed
manudeli opened this issue Jul 28, 2024 · 11 comments
Closed

[Feature]: @suspensive/react-query-next-experimental #1155

manudeli opened this issue Jul 28, 2024 · 11 comments
Assignees

Comments

@manudeli
Copy link
Member

Package Scope

@suspensive/react-query, @suspensive/react-query-4, etc

Description

Support TanStack Query v4 actively

Possible Solution

No response

etc.

No response

@2-NOW
Copy link
Contributor

2-NOW commented Jul 28, 2024

Can you give me more details of work on this ? I am interested in this work

@manudeli
Copy link
Member Author

manudeli commented Jul 28, 2024

Can you give me more details of work on this ? I am interested in this work

There is no @tanstack/react-query-next-experimental@4

You can see this link to check it
https://www.npmjs.com/package/@tanstack/react-query-next-experimental?activeTab=versions

But in my opinion, There is no reason to support TanStack Query v4 to make it be able to use Next.js app router HTML Streaming.

There is so many people using TanStack Query v4 still to support lower version browser yet.

So I want to support them to use streaming html with @suspensive/react-query-next-experimental

@manudeli
Copy link
Member Author

manudeli commented Jul 28, 2024

@2-NOW See docs to know why we support TanStack Query v4 in our doc

I know "this attempt to support TanStack Query v4 + Next.js App router HTML Streaming" could be failure but if we can, It will make big impact

@2-NOW
Copy link
Contributor

2-NOW commented Jul 28, 2024

I have a few thoughts and i'd love to know what you think

experimental features are open to change, including the interface.
the idea is that it would be inconvenient for users to have to modify a feature they use in suspicious because of a breaking change in the original feature, tanstack query, due to a change in the experimental feature.

important thing, i think that the layer that provides intermediate compatibility should be stable.

@manudeli
Copy link
Member Author

important thing, i think that the layer that provides intermediate compatibility should be stable.

In my opinion, TanStack don't modify @tanstack/react-query@^4 so that make us to get quite good stability to support @suspensive/react-query-next-experimental as TanStack Query v4 community resources. and @tanstack/react-query-next-experimental is quite stable for me. maybe they will convert its name as @tanstack/react-query-next soon.

In open source world, In my opinion, early timing to support something could be good for our getting library users choice too. so I think this timing could be good to support @suspensive/react-query-next-experimental too

@manudeli
Copy link
Member Author

And We support @tanstack/react-query@^5 too by @suspensive/react-query(internally @suspensive/react-query-4, @suspensive/react-query-5 made by @gwansikk).

@suspensive/react-query-5 re-export to help migration from "TanStack Query v4 + @suspensive/react-query" to "TanStack Query v5 + @suspensive/react-query"

TanStack Query v4 + @suspensive/react-query

import { useSuspenseQuery } from '@suspensive/react-query' // This re-export @suspensive/react-query-4's useSuspenseQuery

TanStack Query v5 + @suspensive/react-query

import { useSuspenseQuery } from '@suspensive/react-query' // This re-export @tanstack/react-query's useSuspenseQuery

Then, In my opinion, @suspensive/react-query-next-experimental could be implemented similar with @suspensive/react-query's way

TanStack Query v4 + @suspensive/react-query-next-experimental

import { ReactQueryStreamedHydration } from '@suspensive/react-query-next-experimental' // This re-export @suspensive/react-query-next-experimental-4's ReactQueryStreamedHydration

TanStack Query v5 + @suspensive/react-query-next-experimental

import { ReactQueryStreamedHydration } from '@suspensive/react-query-next-experimental' // This re-export @tanstack/react-query-next-experimental's ReactQueryStreamedHydration

@2-NOW
Copy link
Contributor

2-NOW commented Jul 28, 2024

I assume you're expecting the experimental feature to become stable soon, if so,
I completely agree that supporting it would be a big impact.
I'll look into implementing that feature soon :) Thanks.

@manudeli
Copy link
Member Author

manudeli commented Jul 28, 2024

@gwansikk Could you support @2-NOW later to make @suspensive/react-query-next-experimental? In my opinion, you will be best person to support it.

@kangju2000 @bigsaigon333 @SEOKKAMONI I unassigned you guys to narrowen assignee to focus who do this. but if you guys have interest in it. then let me know to assign you guys please

@manudeli manudeli modified the milestones: v2 minor feature, v3 Jul 28, 2024
@gwansikk
Copy link
Collaborator

gwansikk commented Jul 30, 2024

@gwansikk Could you support @2-NOW later to make @suspensive/react-query-next-experimental? In my opinion, you will be best person to support it.

@2-NOW Thank you very much for your contribution. I will assist you with features that universally support two packages version(@suspensive/react-query-next-experimental & @tanstack/react-query-next-experimental), such as @suspensive/react-query

@manudeli
Copy link
Member Author

Show coauthors

Copy link

coauthors bot commented Aug 16, 2024

People can be co-author:

Candidate Reasons Count Add this as commit message
@manudeli #1155 (comment) #1155 (comment) #1155 (comment) #1155 (comment) #1155 (comment) #1155 (comment) #1155 7 Co-authored-by: manudeli <[email protected]>
@2-NOW #1155 (comment) #1155 (comment) #1155 (comment) 3 Co-authored-by: 2-NOW <[email protected]>
@gwansikk #1155 (comment) 1 Co-authored-by: gwansikk <[email protected]>

manudeli added a commit that referenced this issue Aug 18, 2024
# Overview

#1155 

Adds a streaming without prefetching feature that brings the
[react-query-next-experimental](https://tanstack.com/query/latest/docs/framework/react/guides/advanced-ssr#experimental-streaming-without-prefetching-in-nextjs)
feature available in react-query v5 to v4

- [x] Add a default implementation
  - HydrationStreamProvider
  - ReactQueryStreamedHydration
- [x] ~~Test working well~~ continue with the follow-up.


<!--
    A clear and concise description of what this pr is about.
 -->

## PR Checklist

- [x] I did below actions if need

1. I read the [Contributing
Guide](https://github.com/toss/suspensive/blob/main/CONTRIBUTING.md)
2. I added documents and tests.

---------

Co-authored-by: Jonghyeon Ko <[email protected]>
Co-authored-by: Jonghyeon Ko <[email protected]>
@manudeli manudeli closed this as not planned Won't fix, can't repro, duplicate, stale Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants