Skip to content

_hotkeysJs.default is not a function #521

@julianeden

Description

@julianeden

When I literally copy and paste the first example in the docs, it just errors out. I changed F5 to k but that's all.

import hotkeys from 'hotkeys-js';

hotkeys('k', function(event, handler){
  event.preventDefault()
  alert('you pressed k!')
});

This just errors out with Uncaught TypeError: _hotkeysJs.default is not a function.

What am I missing here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions