# flimflam-render

> The render function for the flimflam pattern

Latest version **0.2.1** (published 2017-01-20) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install flimflam-render
pnpm add flimflam-render
yarn add flimflam-render
bun add flimflam-render
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2017-01-20 |
| First published | 2016-04-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | jay r bolton |
| Maintainers | the_swerve |
| Keywords | flimflam, flyd, snabbdom, ramda |

## Links

- npm: https://www.npmjs.com/package/flimflam-render
- Repository: https://github.com/flimflamjs/flimflam-render
- Homepage: https://github.com/flimflamjs/flimflam-render#readme
- Issues: https://github.com/flimflamjs/flimflam-render/issues
- npm.io page: https://npm.io/package/flimflam-render

## Dependencies (3)

- [flyd](https://npm.io/package/flyd.md) 0.2.2
- [ramda](https://npm.io/package/ramda.md) 0.23.0
- [snabbdom](https://npm.io/package/snabbdom.md) 0.6.3

## Alternatives

- [@mdxeditor/editor](https://npm.io/package/@mdxeditor/editor.md) — 962.4K weekly downloads
- [mmdb-lib](https://npm.io/package/mmdb-lib.md) — 680.9K weekly downloads
- [playcanvas](https://npm.io/package/playcanvas.md) — 36.2K weekly downloads
- [@glw907/cairn-cms](https://npm.io/package/@glw907/cairn-cms.md) — 967 weekly downloads
- [markdown-to-confluence](https://npm.io/package/markdown-to-confluence.md) — 103 weekly downloads

## Recent versions

- 0.2.1 (latest) — 2017-01-20
- 0.2.0 — 2017-01-20
- 0.1.4 — 2016-06-10
- 0.1.3 — 2016-06-09
- 0.1.2 — 2016-06-07
- 0.1.1 — 2016-06-06
- 0.1.0 — 2016-06-06
- 0.0.5 — 2016-05-03
- 0.0.4 — 2016-04-11
- 0.0.3 — 2016-04-08
- 0.0.2 — 2016-04-08
- 0.0.1 — 2016-04-08

## README

# flimflam-render

Render a [Flimflam](http://flimflamjs.github.io) UI component onto the page (and keep rendering/patching it on every stream update).

This module is included in the core `flimflam` package, and you can require it `require('flimflam/render')`.

## render(view, state, container)

This function is all you need to render your top-level UI component to the page. It only needs to be called once for a whole one-page app using the top-most view and state.

* `view`: the top-level view function that takes the state as a parameter and returns a vnode tree
* `state`: an object containing values, flyd streams, and nested objects for use in the view
* `container`: a regular DOM Node that you want to replace with the markup generated by your view function


__Usage__

```js
const render = require('flimflam/render')

// import your app's parent component and view function...
const component = require('./my-component')

const view = component.view
const state = component.init()
const container = document.body
render(view, state, container)
```

### development

Tests use tape and tape-run, and can be executed with: `npm run test`

The main index.js file is plain ES5, while the test file uses browserify with es2040.

---
_Source: https://npm.io/package/flimflam-render · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
