Skip to content
This repository has been archived by the owner on May 6, 2019. It is now read-only.

🤣 Append React DOM Node to HTML element.

Notifications You must be signed in to change notification settings

towry-archived/append-react-dom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NPM

appendReactDOM

Append React DOM Node to an element.

Installation

npm install append-react-dom --save

Usage

<div class="list">
	<div class="item item-1">item 1</div>
</div>
import appendReactDOM from 'append-react-dom';
import ItemComponent from 'components/Item';

let el = document.querySelector('.list');

appendReactDOM(ItemComponent, el, {
	bar: 'bar',
	foo: 'foo'
});

Now the list become:

<div class="list">
	<div class="item item-1">item 1</div>
	<div data-reactroot class="item item-2">item 2</div>
</div>

Copyright © 2017 Towry Wang.

About

🤣 Append React DOM Node to HTML element.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published