File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,12 @@ export function connect(main, initprops={}) {
2222 class Connect extends React . Component {
2323 constructor ( props , context ) {
2424 super ( props , context ) ;
25- this . actions = { } ;
25+ this . actions = {
26+ fromEvent ( e ) {
27+ let { type, target} = e ;
28+ context [ intentStream ] . send ( { type, target} ) ;
29+ }
30+ } ;
2631 let sinks = main ( context [ intentStream ] , props ) ;
2732 let actionsSinks = [ ]
2833 if ( process . env . NODE_ENV != 'production' && initprops . history ) {
@@ -70,7 +75,7 @@ let Most = React.createClass({
7075 let engine = engineClass ( ) ;
7176 if ( process . env . NODE_ENV != 'production' ) {
7277 engine . intentStream . timestamp ( )
73- . observe ( stamp => console . log ( `[${ new Date ( stamp . time ) . toLocaleTimeString ( ) } ][INTENT]: ${ JSON . stringify ( stamp . value ) } ` ) ) ;
78+ . observe ( stamp => console . log ( `[${ new Date ( stamp . time ) . toLocaleTimeString ( ) } ][INTENT]:}` , stamp . value ) ) ;
7479 }
7580
7681 return {
You can’t perform that action at this time.
0 commit comments