This package has been deprecated

Author message:

Replaced with unimorph

@dy/remorph

1.0.2 • Public • Published

remorph Build Status unstable

React/preact-based DOM morpher with nanomorph/morphdom-compatible API.

NPM

import morph from '@dy/remorph'

var el = document.createElement('div')
el.innerHTML = 'hello people'

el = morph(el, <div>nanananana-na-no</div>)
// <div>nanananana-na-no</div>

el = morph(el, <div>teeny, tiny, tin bottle</div>)
// <div>teeny, tiny, tin bottle</div>

Remorph can morph both to JSX or raw HTML. It works with react by default, preact can be used via preact/compat or directly as:

import morph from '@dy/remorph/preact'

let result = morph(fromElement, toElementOrJSX)

See also

  • enhook - enable react/preact/etc hooks for any function.
  • spect - reactive aspect-oriented UI framework.

License

MIT

HK

Package Sidebar

Install

npm i @dy/remorph

Weekly Downloads

2

Version

1.0.2

License

MIT

Unpacked Size

69.6 kB

Total Files

15

Last publish

Collaborators

  • dy