You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove useSyncExternalStore from useIsDevRendering (#77651)
useIsDevRendering is a global pending state for router navigations/
actions. The idiomatic API for this pattern is useOptimistic.
Previously, this was implemented using useSyncExternalStore, which led
to an additional sync render every time a navigation completed. The
advantage of useOptimistic is that it gets automatically reverted in the
same commit as the transition it's associated with.
<!-- Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:
Copy file name to clipboardExpand all lines: packages/next/src/client/components/react-dev-overlay/utils/dev-indicator/use-sync-dev-render-indicator.tsx
0 commit comments