anthonyshort / deku

Render interfaces using pure functions and virtual DOM
https://github.com/anthonyshort/deku/tree/master/docs
3.42k stars 131 forks source link

Question: how do I get `dispatch` on the model? #322

Closed rstacruz closed 8 years ago

rstacruz commented 8 years ago

render, onUpdate and other lifecycle hooks receive a model:

render ({ props, dispatch, path }) { ... }
onCreate ({ props, dispatch, path }) { ... }

But it seems the actual arguments of the model are:

{ props, children, path, context }
anthonyshort commented 8 years ago

This is probably a duplicate of #323. That's fixed, but it would have prevented the dispatch function being passed down correctly.

rstacruz commented 8 years ago

Haha cute, my code made it to the tests :P

On Wednesday, December 30, 2015, Anthony Short notifications@github.com wrote:

This is probably a duplicate of #323 https://github.com/dekujs/deku/issues/323. That's fixed, but it would have prevented the dispatch function being passed down correctly.

— Reply to this email directly or view it on GitHub https://github.com/dekujs/deku/issues/322#issuecomment-167852599.