Skip to content
Discussion options

You must be logged in to vote

Context

  • Remix 2.x
  • Using fetcher.load() to validate/reset form state
  • After load completes, calling navigate(...) doesn’t change route or is flaky

Why
fetcher.load() is asynchronous and drives a transition. If you call navigate in the same tick (or while fetcher.state !== 'idle'), the navigation can be swallowed by the in-flight fetcher transition or immediately reverted by a revalidation.

Fix (minimum viable)
Use an effect that waits for the fetcher to become idle and then navigate based on the response.

import { useEffect } from "react";
import { useFetcher, useNavigate } from "@remix-run/react";

export default function EmailCheck() {
  const navigate = useNavigate();
  const fetcher = u…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@GabeMeister
Comment options

Comment options

You must be logged in to vote
1 reply
@GabeMeister
Comment options

Answer selected by GabeMeister
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
3 participants
Converted from issue

This discussion was converted from issue #10716 on September 02, 2025 00:21.