This commit makes a single package for microcosm's preact and react bindings: microcosm-dom. This allows us to share nearly all of the code between these two rendering frameworks.
I'd like to share more of the tests, but that turned out to be pretty hard. If we did that, I'd probably use the Preact tests, which do not rely on enzyme (which I think is React only).
import { Presenter } from 'microcosm-dom/react'
React.render(<Presenter />, document.body)
// ...................
import { ActionButton } from 'microcosm-dom/preact'
Preact.render(<ActionButton>Click Me</ActionButton>, document.body)
This commit makes a single package for microcosm's preact and react bindings: microcosm-dom. This allows us to share nearly all of the code between these two rendering frameworks.
I'd like to share more of the tests, but that turned out to be pretty hard. If we did that, I'd probably use the Preact tests, which do not rely on enzyme (which I think is React only).