Skip to content

nofluxjs/noflux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Noflux

Simple, stupid state management for JavaScript apps.

Packages

Package Version Dependencies DevDependencies Build
@noflux/state npm (scoped) Dependency Status devDependency Status Build Status
@noflux/react npm (scoped) Dependency Status devDependency Status Build Status

Example

Online debugging: https://codesandbox.io/s/z47wLwP8.

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

Releases

No releases published

Packages

No packages published