noflux
Search…
Noflux
Simple, stupid state management for JavaScript apps.

Packages

Package
Version
Dependencies
DevDependencies
Build

Example

1
import React, { Component } from 'react';
2
import { connect, state } from '@noflux/react';
3
4
state.set({
5
name: 'jack',
6
});
7
8
@connect
9
export default class App extends Component {
10
render() {
11
return (
12
<div>
13
<input onChange={e => state.set('name', e.target.value)} />
14
<p> Hello, my name is {state.get('name')} </p>
15
</div>
16
)
17
}
18
}
Copied!

Documentations

Last modified 9mo ago