pedronauck/reworm
๐ซ the simplest way to manage state
6 Releases
Latest: 7y ago
v2.0.2Latest
โจ ๐ Features
- feat: add `Provider` because of suspense features
- feat: add `subscribe` method
๐ฅ โ ๏ธ Breaking Changes
- Now you need to wrap your entire application using reworm provider!
- ```jsx
- import React from 'react'
- import { Provider, create } from 'reworm'
- const { get } = create({ name: 'John' })
- const App = () => (
- <Provider>
- <div>{get(s => s.name)}</div>
- + 3 more
๐ Listening state changes
- If you want to listen changes on your state you can use `subscribe()`:
- ```jsx
- import React from 'react'
- import { Provider, create } from 'reworm'
- const user = create()
- class App extends Component {
- state = {
- name: 'John'
- + 10 more
v1.0.4
๐ ๐ Bug Fixes
- fix: add build pre release (12fdd1e)
v1.0.3
๐ ๐ Bug Fixes
- fix: remove deepmerge to prevent wrong merges (3578ff2)
v1.0.2
๐ฆ โก๏ธ Improvements
- perf: change state to be in component instance (ebfb176)
- chore: change selector parameter name (#10) (c4c49c5)
v1.0.1
๐ ๐ Bug Fixes
- fix: resolve state as primitive types (997cf46)
v1.0.0
๐ฅ โ ๏ธ BREAKING CHANGE
- refactor: remove context and state provider (34523c36)
- 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:
- ```jsx
- import React from 'react'
- import { create } from 'reworm'
- const { set, get } = create({ name: 'John' })
- class App extends React.Component {
- componentDidMount() {
- + 9 more
