You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Fetch data in Components without any custom hooks.
Describe the solution you'd like
constapiGetUser=createInterface('GET','/user/{id}',{swr: true});constComponent=async({id})=>{constuser=awaitapiGetUser({id});return<>{user.name}</>;}// or in use hookconstComponent=({id})=>{constuser=use(apiGetUser({id}));return<>{user.name}</>;}// And the above code will first fallback to Suspense then renders.
Describe alternatives you've considered
An external utils to wrap api:
Is your feature request related to a problem? Please describe.
Fetch data in Components without any custom hooks.
Describe the solution you'd like
Describe alternatives you've considered
An external utils to wrap api:
Additional context
Implemented as experimental_swr first.
Possible Implement
The text was updated successfully, but these errors were encountered: