Skip to content

Types for synthetic events using compat? #4510

Closed
@jose-torres-marin

Description

Aliasing react and react-dom to preact/compat and then doing:
import { MouseEvent } from 'react'

Typescript complains:
Namespace 'React' has no exported member 'MouseEvent'.ts(2694)

I can see MouseEvent doesn't exist in the index file.

Could anyone clarify the proper way to type a mouse event using preact/compat?

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions