@firtoz/router-toolkit 7.0.0 → 7.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firtoz/router-toolkit",
3
- "version": "7.0.0",
3
+ "version": "7.0.1",
4
4
  "description": "Type-safe React Router 7 framework mode helpers with enhanced fetching, form submission, and state management",
5
5
  "main": "./src/index.ts",
6
6
  "module": "./src/index.ts",
@@ -142,10 +142,12 @@ function FetcherRunner({
142
142
  }, [pendingSubmit, fetcher.submit]);
143
143
 
144
144
  React.useEffect(() => {
145
- const wasSubmitting = prevStateRef.current === "submitting";
145
+ const wasWorking =
146
+ prevStateRef.current === "submitting" ||
147
+ prevStateRef.current === "loading";
146
148
  prevStateRef.current = fetcher.state;
147
149
 
148
- if (wasSubmitting && fetcher.state === "idle" && !settledRef.current) {
150
+ if (wasWorking && fetcher.state === "idle" && !settledRef.current) {
149
151
  settledRef.current = true;
150
152
  if (fetcher.data !== undefined) {
151
153
  onSettle(id, fetcher.data, undefined);