react-routine

0.1.0 • Public • Published

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.

/react-routine/

    Package Sidebar

    Install

    npm i react-routine

    Weekly Downloads

    3

    Version

    0.1.0

    License

    MIT

    Unpacked Size

    28.9 kB

    Total Files

    13

    Last publish

    Collaborators

    • jsonnull