Changes to searchParams don't render loading.tsx
Unanswered
Southern African anchovy posted this in #help-forum
Southern African anchovyOP
Hello, my app has the following structure
In
On an initial visit to the search route the skeleton within
How can I render the
search/
├─ loading.tsx
├─ page.tsxIn
page.tsx results are fetched and passed down to a display component const SearchPage = async (props: SearchPageProps) => {
const searchParams = await props.searchParams;
const results = await postSearch({
filters: searchParams
});
return (
<SearchResults
filters={searchParams}
results={results}
/>
);
};On an initial visit to the search route the skeleton within
loading.tsx is displayed, however when I push (from useRouter) a new set of search params to the same route, the page "hangs" while new content is rendered, rather than displaying the skeleton again. How can I render the
loading.tsx skeleton on subsequent data fetches? Thanks