File tree Expand file tree Collapse file tree 3 files changed +12
-7
lines changed
React.Sample.Mvc4/Content Expand file tree Collapse file tree 3 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ public static INodeJsEngine CreateEngine(INodeJSService nodeJSService)
3838
3939 public T CallFunctionReturningJson < T > ( string function , object [ ] args )
4040 {
41- return _nodeJSService . InvokeFromStringAsync < T > ( WrapAsModule ( function ) , args : args ) . ConfigureAwait ( false ) . GetAwaiter ( ) . GetResult ( ) ;
41+ return _nodeJSService . InvokeFromStringAsync < T > ( WrapAsModule ( $ " { function } (... { JsonConvert . SerializeObject ( args ?? new object [ 0 ] ) } )" ) ) . ConfigureAwait ( false ) . GetAwaiter ( ) . GetResult ( ) ;
4242 }
4343
4444 public void Dispose ( )
@@ -51,10 +51,7 @@ public T Evaluate<T>(string code)
5151 return _nodeJSService . InvokeFromStringAsync < T > ( WrapAsModule ( code ) ) . ConfigureAwait ( false ) . GetAwaiter ( ) . GetResult ( ) ;
5252 }
5353
54- public void Execute ( string contents , string file )
55- {
56- throw new NotImplementedException ( ) ;
57- }
54+ public void Execute ( string contents , string file ) => Execute ( contents ) ;
5855
5956 public void Execute ( string code )
6057 {
Original file line number Diff line number Diff line change @@ -136,6 +136,14 @@ IReactIdGenerator reactIdGenerator
136136
137137 var nodeInstance = _config . CreateNodeJsInstance ( ) ;
138138
139+ if ( _config . LoadReact )
140+ {
141+ nodeInstance . ExecuteResource ( _config . UseDebugReact
142+ ? "React.Core.Resources.react.generated.js"
143+ : "React.Core.Resources.react.generated.min.js" ,
144+ typeof ( ReactEnvironment ) . Assembly ) ;
145+ }
146+
139147 LoadUserScripts ( nodeInstance ) ;
140148
141149 return nodeInstance ;
Original file line number Diff line number Diff line change @@ -66,9 +66,9 @@ function CommentsBox(props: CommentsBoxProps) {
6666 return < em > Loading...</ em > ;
6767 } else if ( state . hasMore ) {
6868 return (
69- < Reactstrap . Button onClick = { loadMoreClicked } >
69+ < button onClick = { loadMoreClicked } >
7070 Load More
71- </ Reactstrap . Button >
71+ </ button >
7272 ) ;
7373 } else {
7474 return < em > No more comments</ em > ;
You can’t perform that action at this time.
0 commit comments