shouldRevalidate
is not honored when the future
is passed to createMemoryRouter
#10274
Labels
shouldRevalidate
is not honored when the future
is passed to createMemoryRouter
#10274
Hi there 👋 I'm the maintainer of
storybook-addon-remix-react-router
.When working on the new
future
flag ( JesusTheHun/storybook-addon-remix-react-router#76 ), one of my test stopped working after setting the said flag.Not sure if this is an expected behavior, given there is a
v7_fetcherPersist
flag, so I have to check with you guys.So basically the question boils down to : when
shouldRevalidate
returnsfalse
andv7_fetcherPersist
is left unset but thefuture
property is set, is it normal that the loader is called again ?Setting
v7_fetcherPersist: true
along withshouldRevalidate() => false
restores the previous behavior.Reproduction
Link to the repo : https://github.com/JesusTheHun/storybook-addon-remix-react-router/blob/11132084dfa09d929ea09770963f17e17ddee6d1/src/stories/v2/v2Stories.spec.tsx#L249
The test below passes when the
createMemoryRouter
does not receive thefuture
argument, but fails when it does. Even if thefuture
object is empty.System Info
Used Package Manager
npm
Expected Behavior
The loader should not be called twice
Actual Behavior
The loader is called twice
The text was updated successfully, but these errors were encountered: