-
Notifications
You must be signed in to change notification settings - Fork 936
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Display error if port is already in use #1335
Conversation
|
||
import SidebarStateless from "./Stateless" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really a fan of these Stateless.tsx files.
Apply Sweep Rules to your PR?
|
connections: Connection[] | ||
selectedClientId: string | ||
orphanedCommands: any[] // Command[] | ||
commandListeners: ((command: any) => void)[] // ((command: Command) => void)[] | ||
} | ||
|
||
type Action = | ||
| { type: ActionTypes.ServerStarted; payload: undefined } | ||
| { type: ActionTypes.ServerStopped; payload: undefined } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I honestly think we should implement MobX-State-Tree in Reactotron. I am not a big fan of the useReducer & provider/context DX.
@@ -12,38 +12,32 @@ import { createServer } from "reactotron-core-server" | |||
// configure a server | |||
const server = createServer({ | |||
port: 9090, // default | |||
|
|||
onStart: () => null, // fires when we start the server |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These examples were wrong. I fixed them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes #1334.
This adds an icon to the left sidebar that indicates the server status: Stopped, Started, or Port Unavailable.
Clicking the icon reloads Reactotron, which is a quick & dirty way to attempt reconnection. In the future, we can handle it more elegantly.