Naphthalene Possum Management
Miss any of our Open RFC calls?Watch the recordings here! »

@framejs/renderer-react

1.0.9 • Public • Published

@framejs/renderer-react

FrameJS rendererer for React.

Install

$ npm install @framejs/core @framejs/renderer-react react

Usage

import { CustomElement } from '@framejs/core';
import { withReact } from '@framejs/renderer-preact';
import React from 'react';
 
class ReactHello extends React.Component {
  render() {
    const { children, yell } = this.props;
    return <div>Hello, {yell ? <strong>{children}</strong> : children}!</div>;
  }
}
 
@CustomElement({
    tag: 'my-element'
})
class MyElement extends withReact(HTMLElement) {
    @Attribute() checked = true;
 
    render() {
        return <ReactHello yell={true}>ReactJS</ReactHello>
    }
}

Install

npm i @framejs/renderer-react

DownloadsWeekly Downloads

1

Version

1.0.9

License

MIT

Unpacked Size

30.8 kB

Total Files

7

Last publish

Collaborators

  • avatar