acdlite / flummox

Minimal, isomorphic Flux.
http://acdlite.github.io/flummox
1.69k stars 114 forks source link

Missing getActionsAsObject from Actions #242

Closed dariocravero closed 9 years ago

dariocravero commented 9 years ago

Hi all,

There seems to be an issue with the new way of injecting actions into a FluxComponent, essentially, the default getter being referenced, getActionsAsObject doesn't exist :).

Should it live somewhere in createActions?

I'm overcoming this now by defining a getter myself but it seems like a bit of an overkill :(

class ViewContainer extends FluxComponent {
  render() {
    return <FluxComponent
      actions={{router: ({navigate}) => ({navigate})}}
      stores={{router: ['keys', 'uri']}}><View /></FluxComponent>;
  }
}

Is it a bug? Thanks, Darío

johanneslumpe commented 9 years ago

@dariocravero this is a bug and has already been fixed in master :)

dariocravero commented 9 years ago

@johanneslumpe sorry, I meant to refer to the line you pointed out and referred to the store's method instead. However, as I wrote above, that's only calling getActionsAsObject. Unless I'm missing something -perhaps it is in an unmerged branch?-, getActionsAsObject isn't defined anywhere else on the codebase and that would be the bug?

johanneslumpe commented 9 years ago

oh shoot! Man I shouldn't do stuff when I'm sleepy. You are right. It is fixed in one place, but still not in another. I will get this fixed asap :)

johanneslumpe commented 9 years ago

Ok, this is fixed with #248 - thanks for paying attention! :+1: Can you pull from master again and check? Sorry for an inconvenience caused by this!

dariocravero commented 9 years ago

That's perfect! :) Thanks! :dancer: