React-query: initialData option for useQuery

Created on 2 Dec 2019  路  3Comments  路  Source: tannerlinsley/react-query

Is it possible to have an initialData option for useQuery like in swr.

I'm using Next.js to fetch data in getInitialProps and i'd like that value to be the initial data when the same request is made with useQuery.

Most helpful comment

config.initialData is now supported in version 0.3.19 馃帀

All 3 comments

config.initialData is now supported in version 0.3.19 馃帀

where can i find the config.initialData document. I don;t see any details

Was this page helpful?
0 / 5 - 0 ratings