How to use the fre.render function in fre

To help you get started, we’ve selected a few fre examples, based on popular ways it is used in public projects.

github yisar / fre / demo / useContext.js View on Github external
import { useContext, Context, render, h } from 'fre'

function App () {
  const context = useContext(Context)
  return <main>{context}</main>
}

render(
  <Context value='hello world!'>
    <App />
  </Context>,
  document.body
)
github yisar / fre / demo / doc / index.js View on Github external
<p align='center'>
          <img
            src='http://wx2.sinaimg.cn/mw690/0060lm7Tly1ftpm5b3ihfj3096097aaj.jpg'
            alt='fre logo'
            width='180'
          />
        </p>
        <h1 align='center'>Fre</h1>
        <h3 align='center'>Fast 1kb React-like hooks API js library</h3>
      </div>
      <div class='wrap' />
    </div>
  )
}

render(<App />, document.body)

fre

Tiny Concurrent UI library with Fiber.

MIT
Latest version published 2 months ago

Package Health Score

78 / 100
Full package analysis

Similar packages