GitPedia
pedronauck

pedronauck/reworm

๐Ÿซ the simplest way to manage state

6 Releases
Latest: 7y ago
v2.0.2Latest
pedronauckpedronauckยท7y agoยทOctober 6, 2018
GitHub

โœจ ๐Ÿš€  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
pedronauckpedronauckยท7y agoยทAugust 22, 2018
GitHub

๐Ÿ› ๐Ÿž&nbsp; Bug Fixes

  • fix: add build pre release (12fdd1e)
v1.0.3
pedronauckpedronauckยท7y agoยทAugust 22, 2018
GitHub

๐Ÿ› ๐Ÿž&nbsp; Bug Fixes

  • fix: remove deepmerge to prevent wrong merges (3578ff2)
v1.0.2
pedronauckpedronauckยท7y agoยทAugust 22, 2018
GitHub

๐Ÿ“ฆ โšก๏ธ&nbsp; Improvements

  • perf: change state to be in component instance (ebfb176)
  • chore: change selector parameter name (#10) (c4c49c5)
v1.0.1
pedronauckpedronauckยท7y agoยทAugust 21, 2018
GitHub

๐Ÿ› ๐Ÿž&nbsp; Bug Fixes

  • fix: resolve state as primitive types (997cf46)
v1.0.0
pedronauckpedronauckยท7y agoยทAugust 21, 2018
GitHub

๐Ÿ’ฅ โš ๏ธ&nbsp; 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