toss / suspensive

Manage asynchronous operations, timing, error handling, detecting intersection of elements, and caching easily and declaratively (One of TanStack Query community resources)
https://suspensive.org
MIT License
479 stars 45 forks source link

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

Open manudeli opened 1 month ago

manudeli commented 1 month ago

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 commented 1 month ago

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

manudeli commented 1 month ago

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 commented 1 month ago

@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 commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

@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

gwansikk commented 1 month ago

@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 commented 3 weeks ago

Show coauthors

coauthors[bot] commented 3 weeks ago

People can be co-author:

Candidate Reasons Count Add this as commit message
@manudeli https://github.com/toss/suspensive/issues/1155#issuecomment-2254346832 https://github.com/toss/suspensive/issues/1155#issuecomment-2254348806 https://github.com/toss/suspensive/issues/1155#issuecomment-2254350405 https://github.com/toss/suspensive/issues/1155#issuecomment-2254351722 https://github.com/toss/suspensive/issues/1155#issuecomment-2254352597 https://github.com/toss/suspensive/issues/1155#issuecomment-2292907356 https://github.com/toss/suspensive/issues/1155 7 Co-authored-by: manudeli <61593290+manudeli@users.noreply.github.com>
@2-NOW https://github.com/toss/suspensive/issues/1155#issuecomment-2254341060 https://github.com/toss/suspensive/issues/1155#issuecomment-2254348840 https://github.com/toss/suspensive/issues/1155#issuecomment-2254351802 3 Co-authored-by: 2-NOW <71202076+2-NOW@users.noreply.github.com>
@gwansikk https://github.com/toss/suspensive/issues/1155#issuecomment-2257505776 1 Co-authored-by: gwansikk <39869096+gwansikk@users.noreply.github.com>