payloadcms / payload-admin-bar

An admin bar for React apps using Payload
MIT License
24 stars 4 forks source link

Next.js app router reload issues #6

Closed cbratschi closed 2 weeks ago

cbratschi commented 1 year ago

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 commented 2 weeks ago

This issue is fixed in Next.js 15.