Fix example code in doc

This commit is contained in:
Cole Lawrence 2022-04-22 14:08:11 -04:00 committed by GitHub
parent dfd88c6b1e
commit b10ae71b92
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -275,7 +275,7 @@ const mousePositionD = prism(() => {
'setupListeners', 'setupListeners',
() => { () => {
const handleMouseMove = (e: MouseEvent) => { const handleMouseMove = (e: MouseEvent) => {
setPos([e.screenX, e.screenY]) setPos({x: e.screenX, y: e.screenY})
} }
document.addEventListener('mousemove', handleMouseMove) document.addEventListener('mousemove', handleMouseMove)