Skip to content

monajs/mona-react

Repository files navigation

轻量版UI框架 mona-react

与 React 的语法完全一致,方便大家快速的上手,可以参考 React 的文档库进行使用。

体积非常的小!!!

npm npm

使用场景

  • 当你开发的组件或者 sdk 有跨框架的需求时,可以考虑使用。
  • 当你需要开发的功能非常的独立且简单,需要潜入到其他的应用中时,可以考虑使用

安装

npm i @monajs/react --save-dev

使用方式

import React, { Component, version } from 'react'
import { render } from 'react/reactDom'
import Test from '../test'

class App extends Component {
	test = null
	componentDidMount () {
		this.test = new Test()
	}

	click = () => {
		this.test.show()
	}

	render () {
		return (
			<div onClick={this.click}>123</div>
		)
	}
}

render(<App />, document.getElementById('appWrapper'))

联系我

微信:yx12032331