OVERMIND
v23.1
v23.1
  • Overmind
  • Introduction
  • Quickstart
  • How to learn
  • Videos
  • FAQ
  • Core
    • Devtools
    • Configuration
    • State
    • Actions
    • Effects
    • Operators
    • Statecharts
    • Server Side Rendering
    • Typescript
  • views
    • React
    • Angular
    • Vue
  • Addons
    • GraphQL
  • Guides
    • Connecting components
    • Connecting to React Native
    • Managing lists
    • State first routing
    • Move to Typescript
    • Testing
  • API
    • action
    • addFlushListener
    • addMutationListener
    • createOvermind
    • createOvermindMock
    • createOvermindSSR
    • derive
    • effects
    • events
    • json
    • lazy
    • merge
    • namespaced
    • onInitialize
    • operators
    • reaction
    • rehydrate
    • statecharts
Powered by GitBook
On this page
  • VS Code
  • Standalone app
  • Connecting from the application
  • Connecting on Chromebook
  • Hot Module Replacement
  1. Core

Devtools

PreviousFAQNextConfiguration

Last updated 4 years ago

VS Code

For the best experience you should install the extension. This will allow you to work on your application without leaving the IDE at all.

If you are using the Insiders version of VSCode the extension will not work. It seems to be some extra security setting.

Standalone app

Alternatively you can install the standalone application of the devtools. You can start it with the NPM executor as:

npx overmind-devtools@latest

Adding @latest just ensures that you break any caching, meaning you will always run the latest version

You can also install the devtools with your project, allowing you to lock a specific version of the devtools to your project:

npm install overmind-devtools
npm install overmind-devtools concurrently
package.json
{
  ...
  "scripts": {
    "start": "concurrently \"overmind-devtools\" \"someBuildTool\""
  },
  ...
}

Connecting from the application

When you create your application it will automatically connect through localhost:3031, meaning that everything should just work out of the box. If you need to change the port, connect the application over a network (mobile development) or similar, you can configure how the application connects:

import { createOvermind } from 'overmind'
import { config } from './overmind'

const overmind = createOvermind(config, {
  devtools: '10.0.0.1:3031'
})

Connecting on Chromebook

ChromeOS does not expose localhost as normal. That means you need to connect with penguin.termina.linux.test:3031, or you can use the following plugin to forward localhost:

Hot Module Replacement

Typically you add this, here showing with React:

import React from 'react'
import { render } from 'react-dom'
import { createOvermind } from 'overmind'
import { Provider } from 'overmind-react'
import { config } from './overmind'
import { App } from './components/App'


const overmind = createOvermind(config)

render(<Provider value={overmind}><App /></Provider>, document.querySelector('#app'))

// Allows this module to run again without refresh,
// meaning "createOvermind" runs again and automatically
// reconfigures
if (module.hot) {
  module.hot.accept()
}

Though you can also manually only update Overmind by:

import React from 'react'
import { render } from 'react-dom'
import { overmind } from './overmindInstance'
import { Provider } from 'overmind-react'
import { App } from './components/App'

render(<Provider value={overmind}><App /></Provider>, document.querySelector('#app'))

import { createOvermind } from 'overmind'
import { config } from './overmind'

export const overmind = createOvermind(config)

// When this module runs again "createOvermind" is run
// and it automatically reconfigures
if (module.hot) {
  module.hot.accept()
}

With the package you can start the devtools as you start your build process:

A popular concept introduced by Webpack is . It allows you to make changes to your code without having to refresh. Overmind automatically supports HMR. That means when HMR is activated Overmind will make sure it updates and manages its state, actions and effects. Even the devtools will be updated as you make changes.

CONCURRENTLY
HMR
OVERMIND DEVTOOLS
LogoConnection Forwarder