payload-admin-bar icon indicating copy to clipboard operation
payload-admin-bar copied to clipboard

Next.js app router reload issues

Open cbratschi opened this issue 2 years ago • 0 comments

This issue is most likely not related to this component but I document it here in case someone else has the same issue.

On page changes we pass different collection and ID values to the component. The component always gets fully re-rendered i.e. user changes to undefined and a network request is needed to get the user. This leads to some flickering: admin bar disappears and renders again once the user is known again.

Most likely this is a Next.js issue. The component looks fine and should only load the user once. Will update this ticket once I have more details.

cbratschi avatar Oct 11 '23 10:10 cbratschi