Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

alt

Package Overview
Dependencies
Maintainers
1
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

alt - npm Package Versions

13
7

0.17.6

Diff

Changelog

Source

0.17.6

Added

  • Can dispatch FSA actions directly through alt.dispatch. commit
goatslacker
published 0.17.5 •

Changelog

Source

0.17.5

Added

  • Makes alt FSA compliant. commit

Changed

  • Removes the warning if nothing is dispatched. commit
  • Fix regression for not setting state if reduce returns undefined. commit
goatslacker
published 0.17.4 •

Changelog

Source

0.17.4

Added

  • Allow dispatching action creators. commit
  • Warn if nothing is dispatched. commit
  • Pass store state to bootstrap lifecycle. commit
  • setState now handles values. commit
  • ImmutableUtil supports bootstrapping Records and more. commit

Changed

  • contextTypes are now copied onto connectToStores. commit
  • better typescript definitions. commit
goatslacker
published 0.17.3 •

Changelog

Source

0.17.3

Changed

  • Moved hot load delete of stores up to remove the warning shown in console. commit
goatslacker
published 0.17.2 •

Changelog

Source

0.17.2

Added

  • Add onMount handler for AltContainer. commit

  • Expose a reduce function for every store by default. commit

    If you're using reducers then this allows you to not ever use waitFor since you can just call store.reduce(store.getState(), payload) in order to derive data.

  • Allow values for store state. commit

    this.state can now be any valid JS value rather than always being an object.

  • Add some reducer utils. commit

    These reducer utils can be used for easily working with reducer only stores

Changed

  • Return value from sources local method. commit

  • Delete stores on hot reload. commit

    Working with react hot loader is now simpler.

  • Make fp tools faster by pulling directly from state. commit

  • Throw if listen does not get a function. commit

  • Change the connectToStores displayName. commit

  • Allow listening to same action with multiple methods. commit

goatslacker
published 0.17.1 •

Changelog

Source

0.17.1

Changed

  • Returning a promise from action no longer makes the action dispatch by default. commit
goatslacker
published 0.17.0 •

Changelog

Source

0.17.0

Breaking Changes

  • Removed Symbol

    Upgrade Guide

    • Remove all references to Symbol, Symbol.keyFor, etc.
    • Get access to the action's unique id via myAction.id
  • Removed getEventEmitter()

    Upgrade Guide

    • You can no longer access the internal event emitter to dispatch your own custom events. This is usually an anti-pattern.
    • If you still need this behavior you can create your own event emitter in your store.
class TodoStore {
  constructor() {
    this.eventEmitter = new EventEmitter()

    this.exportPublicMethods({
      getEventEmitter: () => this.eventEmitter
    });
  }
}
  • Removed _storeName.

    Upgrade Guide

    • _storeName was an internal property to the store where the store's name was kept.
    • You can now use displayName instead which is a public API.
  • Removed stateKey. commit

    Upgrade Guide

    • A stateKey property was configurable on stores as well as app level.
    • This has now been removed.
    • This key was mostly used so you can use the react-like API of this.state, now this is being supported first-class.
// old behavior
class MyStore {
  static config = { stateKey = 'state' }

  constructor() {
    this.state = {}
  }
}

Now you can just use this.state directly. If it exists it'll be picked up.

// old behavior
class MyStore {
  constructor() {
    this.state = {}
  }
}

The old behavior of assigning state directly as instance properties will continue to be supported. However, this new behavior will be favored in the docs.

  • Render.toString/toStaticMarkup now return an object rather than a string of html.

    Note: Render API is still in flux

    Upgrade Guide

// old
Render.toString(App, props).then(markup => console.log(markup))

// new
Render.toString(App, props).then(obj => console.log(obj.html))
  • Render.toDOM no longer locks by default.

    Upgrade Guide

    • Render.toDOM used to "lock" meaning it wouldn't perform the fetches on the client when it rendered.
    • Now this is configurable and off by default in case you want to use Render to render client side only.
// old
Render.toDOM(App, props, document.getElementById('react-root'))

// new
// the `true` is to not fetch client side.
Render.toDOM(App, props, document.getElementById('react-root'), true)

Added

  • A sweet new DispatcherDebugger react component which lets you debug your flux application on the browser. commit
  • You may now return from actions directly in order to dispatch, no need to call this.dispatch.
  • connectToStores can now be used where you specify the methods at the callsite. commit
  • statics addon lets you add your static methods to components that have been connected. commit
  • TypeScript definitions!. commit

Changed

  • Made the promise resolution to then(success, failure) so errors will be properly rejected. commit
goatslacker
published 0.16.10 •

Changelog

Source

0.16.10

Added

  • componentDidConnect for connectToStores. Allows you to specify data fetching in there. commit

  • Hot reload of stores using webpack. commit

Changed

  • Reversed the then/catch in the promise resolution for data sources so the catch only handles data source failures. commit

  • Throw when passing undefined to store.unlisten. commit

goatslacker
published 0.16.9 •

Changelog

Source

0.16.9

Added

  • preventDefault to stop a store from emitting a change. commit

  • observe() a way for POJOs to observe for changes. commit

  • otherwise() listen to all dispatches that have not been bound in your stores. commit

  • reduce() listen to all dispatches in a store and return the new state. commit

  • output() transform the output that is emitted from the stores. commit

  • Proper server rendering resolving all data at the component level before rendering. commit

  • Batched dispatches to avoid having componentWillMount cause a cannot dispatch while dispatching error when it loses context. commit

  • Alt.debug for registering your alt instance with chrome dev tools. commit

  • Function utils for transforming store state. commit

goatslacker
published 0.16.8 •

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc