# @stomprocket/f

> functional frontend lib

Latest version **0.1.0** (published 2019-03-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install @stomprocket/f
pnpm add @stomprocket/f
yarn add @stomprocket/f
bun add @stomprocket/f
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2019-03-21 |
| First published | 2019-03-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | swissChili |
| Maintainers | swisschili |

## Links

- npm: https://www.npmjs.com/package/@stomprocket/f
- npm.io page: https://npm.io/package/@stomprocket/f

## Recent versions

- 0.1.0 (latest) — 2019-03-21

## README

# f.js - a functional frontend framework

f.js aims to remove all the oo bloat and provide a simple abstraction
over DOM manipulation that allows clean, functional, and scalable
code to be used with ease. 

## parts of a f.js application

An f.js app consists of a model, a view, and an updater or controller.
The view is a representation of the DOM tree that will be built by f.js,
the model is a JavaScript object that contains the state of the app, and
the updater or controller (the names are fairly interchangeable) contains
the logic for how to modify the state (model) based on events. Events can
be dispatched from DOM elements when certain things occur (like a button
being pressed), or from async function (which JS is quite good at).

## hello world

```js
// This function takes the model and renders some html
let view = model =>
  // the div function creates a <div /> tag
  div
    // first argument set contains any attributes
    ()
    // second contains body
    (model.helloWorld)

// Just return the model unmodified on update
let update = model => model

// render on the #app element
render("#app", view, update, {
  helloWorld: "Hello, WOrld!"
})
```

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