0.1.3 • Published 7 years ago

webpack-Minimount-starter v0.1.3

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

Minimount

Mount your React components using HTML elements

Usage

<react-component component="Hello">
    <react-props>
     <react-prop key="name" value="user" />
    </react-props>
</react-component>

<script>
var component = React.createClass(/* ... */);
minimount.register('Hello', component);
</script>

By default, prop values will be passed as strings. If you want to pass a JavaScript object, you can tell minimount to eval it as such:

<react-component component="Hello">
    <react-props>
     <react-prop key="name" value="eval({ping: 'pong'})" />
    </react-props>
</react-component>

In this case, the eval() tells minimount to eval its contents. As you know, eval is evil, so use this carefully.

Getting started

Install it using yarn or npm

yarn add minimount

npm install --save minimount

Note

This is the initial release of minimount, and as such it may not be feature complete. If you have any feature ideas, feel free to leave an issue or PR.