not-redux

1.0.1 • Public • Published

Demo at https://stackblitz.com/edit/react-frbq56

Install

npm install not-redux

HowTo

import { createStore, connect } from 'not-redux'

var person = createStore() // create a data store

// connect component to store
var PersonFullName = connect(person, state => {
    var name = [
        state.firstName,
        state.lastName
    ].join(' ')
    return { name }
})(props => <span>{props.name}</span>)

ReactDOM.render(<PersonFullName/>, rootElement)

// set store firstName to Dan
person.set('firstName', 'Dan')
// set store lastName as object
person.set({
    lastName: 'Abramov'
})

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.15latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.15
1.0.00

Package Sidebar

Install

npm i not-redux

Weekly Downloads

0

Version

1.0.1

License

ISC

Unpacked Size

3.43 kB

Total Files

6

Last publish

Collaborators

  • dolchi21