Improvement
the default returnValue of data at least in useQuery should be undefined instead of null
if you return undefined then you can make use of set default values as shown below
const { data = [] } = useQuery(
'TrendingShows',
loadTrendingShows
);
I agreed with your recommendation. But as a workaround for now, you can use the initialData prop as described here to set your data to an empty array for example
https://github.com/tannerlinsley/react-query#ssr--initial-data
This will be fixed in the next release 馃帀
Most helpful comment
This will be fixed in the next release 馃帀