question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Events not triggered correctly when using connect mixin

See original GitHub issue

By emacsen at Stack Overflow: http://stackoverflow.com/questions/28179086/not-triggering-react-event-correctly.

Store

var taskStore = Reflux.createStore({
  listenables: [taskActions],
  init: function(){
    this.tasks = [];
    this.index = {};
    this.trigger(this.tasks);
  },
  onLoad: function(arr){
    var idx = {}
    arr.forEach(function(ele){
      idx[ele.id] = ele
    });
    this.tasks = arr;
    this.index = idx;
    this.trigger(arr);
  }
});

Component

var App = React.createClass({
    mixins: [
        Reflux.connect(taskStore,"tasks"),
        Reflux.connect(taskIndex, "index"),
    ],
...

Causes a Uncaught TypeError: Cannot read property 'apply' of undefined in Chrome, originating from the listen method.

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
jeffscottwardcommented, Mar 31, 2015
  componentWillMount: function(){

    // Assign listeners for data loading
    this.listenTo(ChatterStore, this.publishedDataStatus);
  },

where publishedDataStatus was not anywhere in my code yet.

1reaction
jeffscottwardcommented, Apr 1, 2015

Yea. Needs better reporting :-\

Read more comments on GitHub >

github_iconTop Results From Across the Web

Naviagtion Mixin not working after imperative save
Onclick calls the method handleConfirm. The issue I am facing is though the record is created/saved succesffully in the backend, the system ...
Read more >
Jackson mixin not working for embedded types in Spring MVC
I'm using spring MVC 3.0 and jackson 1.8. I have an object called EventEntry. That object has a property user, returning the type...
Read more >
Ditch Events mixin, make Evented base class instead #2280
Currently we copy all Events functions into each Leaflet class. For some reason I initially thought standalone mixins are a great idea in ......
Read more >
Ext.mixin.Observable | Ext JS 6.0.2 - Sencha Documentation
Subclasses are expected to have a property "events" which is populated as event listeners register, and, optionally, a property "listeners" with configured ...
Read more >
Tracking queries, object and Session Changes with Events
do_orm_execute() event hook intends to replace the previous use of the QueryEvents.before_compile() event, which was not fired off consistently for various ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found