@mybricks/rxui
TypeScript icon, indicating that this package has built-in type declarations

1.0.87 • Public • Published

@mybricks/rxui

Responsive framework for React programing,like the Mobx but not only Mobx

Usage

import {render, useObservable} from '@mybricks/rxui'

render(<App/>, document.querySelector('#containerDomId'))

function App() {
  const obs = useObservable(class {
    num: number = Math.random()
  })

  return (
    <div>
      {obs.num}
      <button onClick={() => obs.num = Math.random()}>ChangeValue</button>
    </div>
  )
}

API

render

Type:

type Render = (
  renderTarget: JSX | (() => JSX),
  parentDom: HTMLElement,
  callback?: Function
) => void

Demos:

import {render} from '@mybricks/rxui'

//1.Like reactDom's render
render(<SomCom/>, parentDom, callback)

//2.Factory function
render(()=><SomCom/>, parentDom, callback)

/@mybricks/rxui/

    Package Sidebar

    Install

    npm i @mybricks/rxui

    Weekly Downloads

    1

    Version

    1.0.87

    License

    MIT

    Unpacked Size

    51.8 kB

    Total Files

    6

    Last publish

    Collaborators

    • yingpengsha
    • z35635
    • letterletter
    • zeeker
    • jacksonliu89
    • jidan.wd
    • tangxiaoxin
    • stuzhaoxing
    • leo306
    • godstream
    • leon_js
    • andyzou
    • mybricks-group