Skip to content
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

empty canvas after switching to new vscode extension #39

Closed
ptaranto opened this issue Jan 27, 2022 · 3 comments
Closed

empty canvas after switching to new vscode extension #39

ptaranto opened this issue Jan 27, 2022 · 3 comments

Comments

@ptaranto
Copy link

ptaranto commented Jan 27, 2022

no machine is rendered in the new visualizer tab either when using:

  • createMachine({...})
const promiseMachine = createMachine({
  id: 'promise',
  initial: 'pending',
  states: {
    pending: {
      on: {
        // state transition (shorthand)
        // this is equivalent to { target: 'resolved' }
        RESOLVE: 'resolved',

        // state transition (object)
        REJECT: {
          target: 'rejected',
        },
      },
    },
    resolved: {
      type: 'final',
    },
    rejected: {
      type: 'final',
    },
  },
})

or

  • model = createModel(); model.createMachine({...})
import { createModel } from 'xstate/lib/model'
import { createMachine } from 'xstate'

interface Config {
  featureIsEnabled?: boolean
}

const userFlowModel = createModel(
  {
    config: {} as Config,
  },
  {
    events: {
      TEST_SELECTED: () => ({}),
    },
  }
)

export const userFlowMachine = userFlowModel.createMachine(
  {
    id: 'user-flow',
    initial: 'selectTest',
    states: {
      selectTest: {
        on: {
          TEST_SELECTED: 'test',
        },
      },
      test: {},
      results: {},
    },
  },
  {
    actions: {},
  }
)
@ptaranto
Copy link
Author

PS: old extension was only disabled tho, does it have to be fully uninstalled?

@mattpocock
Copy link
Contributor

@ptaranto Maybe try fully uninstalling it?

@mattpocock
Copy link
Contributor

Fixed in 1.5.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants