Next.js React Server Component - re-render only RSC component(s)

405 Views Asked by At

I'm using Next.js and I would like to be able to re-render only RSC components without refreshing whole page (like router.refresh() does) as it's loosing current page state.

I want to call refresh in "strange" places like on mutation succeess (from react-query) or in forms, not directyl related to refreshed component itself.

Is that possible?

Thank you!

I've tried router.refresh(), but I'm loosing page state (for example table pagination, table is refetching data,...).

0

There are 0 best solutions below