noflux
  • Noflux
  • Choose a language
  • Noflux
    • migration
      • Migration from noflux to v0.x
      • from-v0-to-v1
      • Migration
    • advanced
      • @connect
      • API
      • state
    • Summary
    • basic
      • React
      • Basic
      • state
    • getting-started
  • Noflux
    • Summary
    • advanced
      • state
      • @connect
      • API
    • basic
      • React
      • 基础
      • state
    • migration
      • from-v0-to-v1
      • Migration
      • 从noflux到v0.x
    • getting-started
  • examples
    • README
    • Noflux TodoMVC Example Using TypeScript
Powered by GitBook
On this page
  • Packages
  • Example
  • Documentations

Was this helpful?

Noflux

NextChoose a language

Last updated 4 years ago

Was this helpful?

Simple, stupid state management for JavaScript apps.

Packages

Package

Version

Dependencies

DevDependencies

Build

Example

Online debugging: .

import React, { Component } from 'react';
import { connect, state } from '@noflux/react';

state.set({
  name: 'jack',
});

@connect
export default class App extends Component {
  render() {
    return (
      <div>
        <input onChange={e => state.set('name', e.target.value)} />
        <p> Hello, my name is {state.get('name')} </p>
      </div>
    )
  }
}

Documentations

https://codesandbox.io/s/z47wLwP8
English
简体中文
@noflux/state
@noflux/react
npm (scoped)
Dependency Status
devDependency Status
Build Status
npm (scoped)
Dependency Status
devDependency Status
Build Status