Skip to content

Commit 17cf979

Browse files
committed
V1.1.3 - search params agnostic hook
1 parent 08230d3 commit 17cf979

4 files changed

Lines changed: 35 additions & 8 deletions

File tree

README.md

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,14 @@ Remix Development Tools is an open-source package designed to enhance your devel
1212

1313
### Active Page Tab
1414

15-
The **Active Page** tab in Remix Development Tools allows you to gain insights into the current page you are working on. It provides valuable information and data that can assist you in debugging and understanding the behavior of your application. Key features include:
15+
The **Active Page** tab in Remix Development Tools allows you to gain insights into the current page you are working on. It provides valuable information and data that can assist you in debugging and understanding the behavior of your application.
16+
17+
Key features include:
1618

1719
- **URL Parameters**: Easily view and analyze the URL parameters associated with the current page.
1820
- **Server Responses**: Inspect and review the server responses received by the application for the current page.
1921
- **Loader Data**: Monitor and track the loader data used by the application during page rendering.
20-
- **Outlet boundaries** Activate the **Show Route Boundaries** option to see each Outlet and route boundaries by coloring the background.
22+
- **Outlet boundaries** Activate the **Show Route Boundaries** option to see each Outlet and route boundaries by coloring the background. This needs to make a GET request to the current route when the dev tools are mounted for the first time to work properly and hence it is locked behind a flag. You can enable it by passing `showRouteBoundaries` prop to `true` in the `RemixDevTools` component.
2123

2224
### Routes Tab
2325

@@ -104,6 +106,18 @@ Contributions to Remix Development Tools are welcome! To contribute, please foll
104106
6. Commit and push your changes to your forked repository.
105107
7. Open a pull request, providing a clear description of your changes and their purpose.
106108

109+
### Contributing on Remix Forge integrations
110+
111+
If you want to contribute to the VS Code extension integration follow the steps above and then:
112+
1. Clone the repo for Remix Forge locally.
113+
2. Open it in VS Code.
114+
3. Run `npm install`
115+
4. Run `npm run dev`
116+
5. Click `F5` which will launch a debugger instance of VS Code.
117+
6. In the debugger instance of VS Code, start the remix dev tools
118+
7. Click `Connect to Remix Forge` in the Remix Dev Tools
119+
8. Code on!
120+
107121
## Support
108122

109123
If you like Remix Development Tools consider starring the repository. If you have any questions, comments, or suggestions, please feel free to reach out!
@@ -116,8 +130,14 @@ Remix Development Tools is open-source software released under the [MIT License]
116130

117131
Remix Development Tools was inspired by the Remix framework and aims to enhance the development experience for Remix users.
118132

133+
Feel free to explore Remix Development Tools, and we hope it significantly improves your Remix development process. If you encounter any issues or have suggestions for enhancements, please don't hesitate to open an issue on our GitHub repository. Happy Remixing!
134+
135+
## Thanks
136+
137+
Thanks to all the contributors on this project and the support to the community. You guys are awesome!
138+
119139
---
120140

121-
Feel free to explore Remix Development Tools, and we hope it significantly improves your Remix development process. If you encounter any issues or have suggestions for enhancements, please don't hesitate to open an issue on our GitHub repository. Happy Remixing!
141+
Devoted to my loving wife.
122142

123-
143+
In loving memory of my late Grandfather, who taught me to always be curious, never stop learning, and to always be kind to others. I miss you, Grandpa.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "remix-development-tools",
33
"description": "Remix development tools.",
44
"author": "Alem Tuzlak",
5-
"version": "1.1.2",
5+
"version": "1.1.3",
66
"license": "MIT",
77
"keywords": [
88
"remix",

src/RemixDevTools/hooks/useOutletAugment.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
import { useSubmit, useLocation } from "@remix-run/react";
22
import clsx from "clsx";
3-
import { useEffect } from "react";
3+
import { useEffect, useMemo } from "react";
44

55
const isHooked = Symbol("isHooked");
66
export function useOutletAugment(shouldAugment: boolean) {
77
const submit = useSubmit();
88
const location = useLocation();
9+
const searchParams = useMemo(
10+
() => new URLSearchParams(location.search),
11+
[location]
12+
);
913
useEffect(() => {
1014
if (!shouldAugment) return;
1115
if (window.__remixRouteModules[isHooked as any]) return;
@@ -39,7 +43,10 @@ export function useOutletAugment(shouldAugment: boolean) {
3943
},
4044
});
4145

42-
submit(null, { method: "get", action: location.pathname });
46+
submit(searchParams, {
47+
method: "get",
48+
action: location.pathname,
49+
});
4350
// We only want to run this once regardless of the dependencies and we want it to run after the first render
4451
// eslint-disable-next-line react-hooks/exhaustive-deps
4552
}, []);

src/remix-app-for-testing/app/root.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export default function App() {
5151
<ScrollRestoration />
5252
<Scripts />
5353
<LiveReload />
54-
{RemixDevTools && <RemixDevTools defaultOpen />}
54+
{RemixDevTools && <RemixDevTools defaultOpen showRouteBoundaries />}
5555
</body>
5656
</html>
5757
);

0 commit comments

Comments
 (0)