JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 677
  • Score
    100M100P100Q103333F
  • License ISC

localized react state component

Package Exports

  • react-state

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-state) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

react-state

localized state in React render functions.

npm install react-state --save

class Counter{
  render(){
    return <State initial={0}>{ (val, set) =>
      <div onClick={() => set(val + 1)}>
        clicked {val} times
      </div>
    }</State>;
  }
}

React.render(<Counter/>, el);

based on this thread