metal-react

3.0.0 • Public • Published

metal-react

A function that transforms React components into Metal.js components

Usage

Just call the bridge function with the constructor of the react component you wish to use, and it will return a metal component you can use instead. For example:

import bridge from 'metal-react';
import SomeReactComponent from 'some-react-module';
 
var MetalComponent = bridge(SomeReactComponent);

Now you can use MetalComponent inside your metal-jsx code in the same way that you'd use SomeReactComponent. For example:

render() {
  return <MetalComponent foo="foo" />
}

Setup

  1. Install NodeJS >= v0.12.0 and NPM >= v3.0.0, if you don't have it yet. You can find it here.

  2. Install local dependencies:

npm install
  1. Build the code:
npm run build

Readme

Keywords

Package Sidebar

Install

npm i metal-react

Weekly Downloads

1

Version

3.0.0

License

BSD

Unpacked Size

14.8 kB

Total Files

7

Last publish

Collaborators

  • antonio-ortega
  • daniel.sanz
  • izaera-lr
  • edalgrin
  • pat270
  • liferay
  • bryceosterhaus
  • matuzalemteles
  • gagranta
  • p2kmgcl
  • marko.cikos
  • kresimircoko
  • jbalsas
  • brunobasto
  • rframpton
  • mairatma
  • eduardolundgren