0.1.0 • Published 6 years ago

react-routine v0.1.0

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

React Routine

Build Status Coverage Status npm version

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

Documentation

  • Forthcoming, stay tuned.
0.1.0

6 years ago

0.0.1

6 years ago