Last active
May 29, 2019 11:06
-
-
Save JamesZoft/74416c9763bfc70bfa93a087e886b233 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Blah { | |
foo: null, | |
someModel: null, | |
constructor(args) { | |
someModel = args.someModel; | |
foo = new Foo({ | |
"fn": a | |
}); | |
this.barBaz.handleSomething = this.a.bind(this, this.someModel) | |
} | |
a: function(someModel, event) { | |
return function (event) { | |
someModel.baz(event); | |
} | |
} | |
} | |
class Foo { | |
constructor: function(args) { | |
this.someModel = args.someModel; | |
this.handleStuff = args.fn.bind(this, this.someModel) | |
} | |
} | |
// I want to pass a down the component tree twice to Foo's child so I can execute a. Foo's child will also have a someModel to execute on. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment