react-routine
v0.1.0
Published
A new way to approach building stateful React components.
Downloads
6
Readme
React Routine
An alternate way to write React components, focusing on simple control flow and developer experience.
Unstable, expect breaking changes in the near future.
import React from 'react'
import { routine, setState, componentWillMount } from 'react-routine'
const controller = function*() {
// Wait for component to begin mounting
yield componentWillMount()
// Set some state
yield setState({ title: 'React Routine' })
}
const Header = props => <h1>{props.title}</h1>
export default routine(controller)(Header)
Installation
yarn add react-routine
# npm install --save react-routine
Examples
- Basic (source)
Documentation
- Forthcoming, stay tuned.