You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Removal of dev tools
* Update to readme and exports
* Completely removed the stylesheet export -> moved stylesheet into component
* readme update
* Version 2.0.0 finalized
* readme update
* readme update
* readme update

8
8
9
-
Remix Development Tools is an open-source package designed to enhance your development workflow when working with Remix, a full-stack JavaScript framework for building web applications. This package provides a user-friendly interface consisting of three tabs, **Active Page**, **Terminal** and **Routes**, along with a side tab called **Timeline**. With Remix Development Tools, you can efficiently monitor and manage various aspects of your Remix projects, including page information, URL parameters, server responses, loader data, routes, and more.
9
+
Remix Development Tools is an open-source package designed to enhance your development workflow when working with Remix, a full-stack JavaScript framework for building web applications. This package provides a user-friendly interface consisting of three tabs, **Active Page**, **Terminal**, **Settings** and **Routes**, along with a side tab called **Timeline**. With Remix Development Tools, you can efficiently monitor and manage various aspects of your Remix projects, including page information, URL parameters, server responses, loader data, routes, and more.
10
10
11
11
## How it looks
12
12
### Active pages Tab
@@ -43,14 +43,19 @@ The **Routes** tab enables you to manage and explore the routes within your Remi
43
43
44
44
The **Timeline** side tab provides a timeline view of events occurring during the development process. This tab helps you track the sequence of actions and events, providing valuable insights into the execution flow of your application.
45
45
46
+
### Settings tab
47
+
48
+
The **Settings** tab allows you to tweak your Remix Development Tools to your needs. Allows you to tweak around the height of the dev tools,
49
+
the trigger position, the Remix Forge port and many more options to come.
50
+
46
51
### Terminal tab
47
52
48
53
The terminal tab allows you to run terminal commands from the Remix Dev Tools. This is useful for running commands like `npm run typecheck` or `npm run lint:fix` without having to switch to the terminal in VS code. The tab requires you to connect to Remix Forge VS Code extension to work properly.
49
54
50
-
You can press `Arrow Up` and `Arrow Down` to cycle through the history of commands you have run in the terminal.
51
-
You can press `Arrow Left` and `Arrow Right` to cycle through all available commands in your projects package.json file.
52
-
You can press `Ctrl + C` to cancel the current command.
53
-
You can press `Ctrl + L` to clear the terminal.
55
+
-You can press `Arrow Up` and `Arrow Down` to cycle through the history of commands you have run in the terminal.
56
+
-You can press `Arrow Left` and `Arrow Right` to cycle through all available commands in your projects package.json file.
57
+
-You can press `Ctrl + C` to cancel the current command.
58
+
-You can press `Ctrl + L` to clear the terminal.
54
59
55
60
## Getting Started
56
61
@@ -62,68 +67,39 @@ To install and utilize Remix Development Tools, follow these steps:
62
67
npm install remix-development-tools -D
63
68
```
64
69
65
-
2. Add the following to your application `root.tsx` file:
70
+
2. Add the following to your application `entry.client.tsx` file:
66
71
67
72
```diff
68
-
// We'll lazy load RemixDevTools to ensure it doesn't contribute to production bundle size
69
-
+ import { lazy, Suspense } from "react";
70
-
+ import rdtStylesheet from "remix-development-tools/stylesheet.css";
The `RemixDevTools` component accepts the following props:
107
-
108
-
-`port`: The port number to use for the Remix Development Tools connection to Remix Forge. If you want to change the port and connect to your Remix Forge VS code extension you need to change the port in VS Code too. Defaults to `3003`.
109
-
-`defaultOpen`: Whether to open the Remix Development Tools by default. Defaults to `false`.
110
-
-`position`: The position of the Remix Development Tools trigger. Defaults to `bottom-right`.
111
-
-`requireUrlFlag`: Requires rdt=true to be present in the URL search to open the Remix Development Tools. Defaults to `false`.
112
-
-[**DEPRECATED**]`showRouteBoundaries`:This flag has been deprecated in favor of adding route boundaries. Please see the section below for more information.
113
-
-`hideUntilHover`: Allows you to hide the trigger until you hover over it. Defaults to `false`.
114
-
-`additionalTabs`: Allows you to provide additional tabs to the Remix Development Tools. Defaults to `[]`.
115
-
-`minHeight`: Allows you to set the minimum height of the Remix Development Tools. Defaults to `600`.
116
-
-`minHeight`: Allows you to set the minimum height of the Remix Development Tools. Defaults to `200`.
117
-
118
-
## Adding route boundaries
119
-
120
-
The `showErrorBoundaries` flag has been deprecated in favor of this method. Please use it instead.
121
-
122
-
In order to add Route boundaries to your project you need to do the following two things:
73
+
This might differ if you use <StrictMode> or some other wrappers around <RemixBrowser>, whats important is wrapping the start transition in a callback
5. You should now see your plugin in the Remix Development Tools as a new tab.
@@ -294,107 +274,26 @@ import { useRemixForgeSocket } from "remix-development-tools";
294
274
7. Refer to `react-use-websocket` for more information on how to use the socket and what options it accepts because that is what is used under the hood.
295
275
8. After you're done share your plugin with the community by opening a discussion!
296
276
297
-
## Troubleshooting
298
-
299
-
If you are having trouble getting Remix Development Tools to work, please try the following:
300
-
301
-
### RemixDevTools are not appearing in the DOM / causing re-renders
302
-
303
-
1. Move the RemixDevTools as high as possible in your root.tsx file. It should be the first thing in the body tag.
304
277
278
+
## v1 -> v2 migration guide
279
+
The migration should be really simple. These are the following things you need to do:
280
+
1. Remove the old imports of the stylesheet and addition of the stylesheets to your links export. This is bundled now within the Remix Development Tools.
2. If you were using `initRouteBoundariesClient` and `initRouteBoundariesServer` you just need to replace them with the new `initClient` and `initServer` functions. You can skip the rest of the steps, you're ready to go!
291
+
3. Add the `initClient` function to your `entry.client.tsx` file. This is needed to initialize the route boundaries functionality and possible future functionality. (Refer to getting started steps above on how to do that)
292
+
4. Add the `initServer` function to your `entry.server.tsx` file. This is needed to initialize the route boundaries functionality (and not cause hydration issues) and possible future functionality. (Refer to getting started steps above on how to do that)
293
+
5. You are good to go!
294
+
## Troubleshooting [v1 only]
397
295
296
+
398
297
### HMR is failing with RDT
399
298
400
299
Wrap the `RemixDevTools` component in a `Suspense` component.
0 commit comments