Skip to content

Commit

Permalink
docs(pages/v2): fix useFetcher example (remix-run#7148)
Browse files Browse the repository at this point in the history
  • Loading branch information
machour authored Aug 13, 2023
1 parent c32eca2 commit b7093d8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/pages/v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -509,19 +509,19 @@ function Component() {
const isActionRedirect =
fetcher.state === "loading" &&
fetcher.formMethod != null &&
navigation.formMethod != "GET" &&
fetcher.formMethod != "GET" &&
// If we have no data we must have redirected
fetcher.data == null;

// fetcher.type === "loaderSubmission"
const isLoaderSubmission =
navigation.state === "loading" &&
navigation.state.formMethod === "GET";
fetcher.state === "loading" &&
fetcher.formMethod === "GET";

// fetcher.type === "normalLoad"
const isNormalLoad =
navigation.state === "loading" &&
navigation.state.formMethod == null;
fetcher.state === "loading" &&
fetcher.formMethod == null;
}
```

Expand Down

0 comments on commit b7093d8

Please sign in to comment.