v1.0.0
Changelog
⚠️ BREAKING CHANGE
- refactor: remove context and state provider (34523c3)
Now you don't need to use the <State>
component as provider for state, just use get
, set
or selectors
on the fly wherever you want:
import React from 'react'
import { create } from 'reworm'
const { set, get } = create({ name: 'John' })
class App extends React.Component {
componentDidMount() {
set(prev => ({ name: 'Peter' + prev.name }))
}
render() {
return (
<div>{get(s => s.name)}</div>
)
}
}