Should matchRoute({ pending: true }) match if pendingMs hasn't elapsed yet?
#209
Replies: 2 comments
-
|
We hit a similar inconsitency. We manage highlighted links and pre-opened collapsables depending on the active route in a navigation menu. |
Beta Was this translation helpful? Give feedback.
-
|
To tackle this issues, i created the following helper hooks. I dont know how stable they are. But they seem to work rather fine: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
See https://codesandbox.io/s/pedantic-snowflake-hsd04?file=/src/index.tsx
Each post content is set to pending (indicated with opacity 50%) instantly when you navigate to a new route, even though the
pendingMshasn't elapsed yet.This seems confusing as it's different behaviour to when
pendingElementshows. Am I thinking about it wrong?Beta Was this translation helpful? Give feedback.
All reactions