effector-react v0.18.2 Release Notes

    • ๐Ÿ›  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>