All Versions
22
Latest Version
Avg Release Cycle
-
Latest Release
-

Changelog History
Page 1

  • v0.18.2 Changes

    • ๐Ÿ›  Fix webpack usage issue. To prevent this in a future, webpack integration test was added.

    • ๐Ÿ‘Œ Improve typescript typings for createApi. This code example became type checked

    import {createStore, createApi} from 'effector'
    
    const text = createStore('')
    
    const {addMessage, cut} = createApi(text, {
      addMessage: (text, message) => text + `\n` + message
      cut: (text, {fromIndex, size}) => text.slice(fromIndex, fromIndex + size),
    })
    
    
    • โž• Add umd bundle to npm. Therefore, you can use cdn to include library without bundlers
    <!DOCTYPE html>
    <html>
      <head>
        <script src="https://unpkg.com/[email protected]/effector.umd.js"></script>
      </head>
      <body>
        <script>
          const header = document.createElement('h1')
          document.body.appendChild(header)
          const text = effector.createStore('hello')
          text.watch(str => (header.innerHTML = str))
        </script>
      </body>
    </html>
    
  • v0.18.1 Changes

    • โž• Add forward: common function for forwarding updates and events
    import {forward} from 'effector'
    const unsubscribe = forward({
      from: Event | Store,
      to: Event | Store | Effect,
    })
    
    • โž• add support for storages in store.on
    import {createStore} from 'effector'
    const name = createStore('name')
    const counter = createStore(0).on(name, (count, name) => count++)
    
    • ๐Ÿ‘ Allow to pass {handler: Function} as second argument to createEffect
    import {createEffect} from 'effector'
    const callApi = createEffect('call api', {
      async handler(url) {
        const res = await fetch(url)
        return res
      },
    })
    
    • ๐Ÿ‘‰ Make effect.use return the same effect instead of void (ability to chain method calls)
    import {createEffect} from 'effector'
    const callApi = createEffect('call api').use(url => fetch(url))
    
  • v0.18.0 Changes

    • ๐ŸŽ Log events into Chrome devtools performance timeline
    • โž• Add notifications about errors inside computation chain
    • โž• Add store.defaultState property
    • effector-react: Add createComponent
    • ๐Ÿ‘‰ Make withProps static function
    • ๐Ÿ‘‰ Make effect return plain promise
  • v0.18.0-beta.10 Changes

    • โž• Add Gate
    import {type Gate, createGate} from 'effector-react'
    const AppGate = createGate('app')
    const MainPageGate = AppGate.childGate('main page')
    
    export default ({isLoading, meta}) => (
      <div>
        Application
        <AppGate isLoading={isLoading} />
        {!isLoading && (
          <div>
            Main page
            <MainPageGate meta={meta} />
          </div>
        )}
      </div>
    )
    AppGate.state.watch(({isLoading}) => isLoading)
    
  • v0.17.7 Changes

    • Keep and replay the whole domain history for every new hook
  • v0.17.6 Changes

    • โž• Add domain hooks for handle new events, effects or stores in domain.
    import {createDomain} from 'effector'
    const mainPage = createDomain('main page')
    mainPage.onCreateEvent(event => {
      console.log('new event: ', event.getType())
    })
    mainPage.onCreateStore(store => {
      console.log('new store: ', store.getState())
    })
    const mount = mainPage.event('mount')
    // => new event: main page/mount
    
    const pageStore = mainPage.store(0)
    // => new store: 0
    
    • ๐Ÿ‘Œ Improve TypeScript typings
  • v0.17.5 Changes

    • โž• Add ability to use createEvent, createEffect and createDomain without arguments (omit name)
    • ๐Ÿ›  Fix wrong order of effect names
    • โž• Add createWrappedDomain to watch all nested events and updates
    • โž• Add extract to watch only part of nested storages
    • ๐Ÿ—„ Deprecate .epic method (library supports symbol-observable, so assumed that most.from(event) or Observable.Of(store) covered all use cases)
  • v0.17.4 Changes

    • effector-react: Add check for mounting of store consumer
    • โž• Add effect.use.getCurrent() method to get current used function
    • ๐Ÿ‘Œ Improve type inference in flow typing for createStoreObject
    • ๐Ÿ‘Œ Improve public ts and flow typings
  • v0.17.3 Changes

    • ๐Ÿ›  Fix effector-react typings
    • ๐Ÿ— Build with node 6 target, add engine field to package.json
    • โž• Add warning dependency
  • v0.17.2 Changes

    • ๐Ÿ“ Memoize store.map and store updates