react-mountable

1.0.0 • Public • Published

react-mountable

Let's say you have a non-react-aware thing (we'll call it mountItalic) that needs to mount itself into a regular dom node.

Use this!

import React from 'react'
import {render} from 'react-dom'

import mountable from '../../src'

const mountItalic = el => {
  el.innerHTML = '<em>Hello!</em>'
}

const Italic = mountable(mountItalic)

render(<Italic />, document.querySelector('#demo'))

Readme

Keywords

Package Sidebar

Install

npm i react-mountable

Weekly Downloads

3

Version

1.0.0

License

ISC

Last publish

Collaborators

  • amonks