Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Fun React is a React framework.
Because I love functional programming and ELM, but I can only use JS in work.
Great! Fun React is perfect for you. Because it basically mimic almost everything of ELM 0.17. I bet you can know how to use Fun React right after check the following example.
The overall concept is the same: the state reducer. The main differences are:
reducers
as update
functionsprogram
instead of <Provider />
connect
.
event
: event declarationlink
: event binding between parent and childrenTODO
npm install --save fun-react cycle-react react rx
To run example
cd examples/__the_example__
npm install
npm start
then open http://localhost:8080
in browser.
import React from 'react'
import ReactDOM from 'react-dom'
import {
createProgram,
fromSimpleInit,
fromSimpleUpdate,
createTypes,
caseOf,
createView
} from 'fun-react'
// 1. define message types by function createTypes
const Msg = createTypes('INC', 'DEC')
// 2. define init data
const init = 0
// 3. define update function
const update = caseOf({
INC: (_, count) => count + 1,
DEC: (_, count) => count - 1
})
// 4. define view by function createView
const Counter = createView('Counter', ({model}, {event}) => (
<div>
<h1>Count: {model}</h1>
<button onClick={event(Msg.INC)}>INC</button>
<button onClick={event(Msg.DEC)}>DEC</button>
</div>
))
// 5. compose program by the defined `init`, `update`, `view`
const Program = createProgram({
init: fromSimpleInit(init),
update: fromSimpleUpdate(update),
view: Counter,
inputs: () => []
})
// 6. mount the Program to actual DOM
const rootEl = document.getElementById('app')
ReactDOM.render(<Program />, rootEl)
TODO
TODO
TODO
TODO
The name imply the philosophy. So why name it Fun React:
TODO explain what is Functor, and why can react element be a functor
v0.3.5
2016-12-11
FAQs
Elm like js framework built on top of cycle-react
The npm package fun-react receives a total of 0 weekly downloads. As such, fun-react popularity was classified as not popular.
We found that fun-react demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.