replaceState(state)

Replace the current state with the state provided, if the noEvent is true it will not emit a change event to the listeners.

๐Ÿ“˜

Calls to setState and replaceState emit a change event that notifies listeners, only if the state has been changed by the call.

fluxapp.registerStore('user', {
  actions: {
    onUserLogout: 'user.logout',
  },
     
  onUserLogout: function() {
    this.replaceState({});
  }
 });

๐Ÿ‘

On to getState()