33 * All rights reserved.
44 *
55 * This source code is licensed under the BSD-style license found in the
6- * LICENSE file in the root directory of this source tree. An additional grant
6+ * LICENSE file in the root directory of this source tree. An additional grant
77 * of patent rights can be found in the PATENTS file in the same directory.
88 */
99
2222namespace React
2323{
2424 /// <summary>
25- /// Request-specific ReactJS.NET environment. This is unique to the individual request and is
25+ /// Request-specific ReactJS.NET environment. This is unique to the individual request and is
2626 /// not shared.
2727 /// </summary>
2828 public class ReactEnvironment : IReactEnvironment , IDisposable
@@ -70,7 +70,7 @@ public class ReactEnvironment : IReactEnvironment, IDisposable
7070 /// </summary>
7171 protected readonly Lazy < string > _version = new Lazy < string > ( GetVersion ) ;
7272 /// <summary>
73- /// Contains an engine acquired from a pool of engines. Only used if
73+ /// Contains an engine acquired from a pool of engines. Only used if
7474 /// <see cref="IReactSiteConfiguration.ReuseJavaScriptEngines"/> is enabled.
7575 /// </summary>
7676 protected Lazy < PooledJsEngine > _engineFromPool ;
@@ -141,7 +141,7 @@ IReactIdGenerator reactIdGenerator
141141 _fileSystem = fileSystem ;
142142 _fileCacheHash = fileCacheHash ;
143143 _reactIdGenerator = reactIdGenerator ;
144- _babelTransformer = new Lazy < IBabel > ( ( ) =>
144+ _babelTransformer = new Lazy < IBabel > ( ( ) =>
145145 new Babel ( this , _cache , _fileSystem , _fileCacheHash , _config )
146146 ) ;
147147 _engineFromPool = new Lazy < PooledJsEngine > ( ( ) => _engineFactory . GetEngine ( ) ) ;
@@ -304,6 +304,7 @@ public virtual IReactComponent CreateComponent<T>(string componentName, T props,
304304
305305 var component = new ReactComponent ( this , _config , _reactIdGenerator , componentName , containerId )
306306 {
307+ ClientOnly = clientOnly ,
307308 Props = props ,
308309 ServerOnly = serverOnly
309310 } ;
@@ -329,7 +330,7 @@ public virtual IReactComponent CreateComponent(IReactComponent component, bool c
329330 }
330331
331332 /// <summary>
332- /// Renders the JavaScript required to initialise all components client-side. This will
333+ /// Renders the JavaScript required to initialise all components client-side. This will
333334 /// attach event handlers to the server-rendered HTML.
334335 /// </summary>
335336 /// <param name="clientOnly">True if server-side rendering will be bypassed. Defaults to false.</param>
@@ -344,7 +345,7 @@ public virtual string GetInitJavaScript(bool clientOnly = false)
344345 }
345346
346347 /// <summary>
347- /// Renders the JavaScript required to initialise all components client-side. This will
348+ /// Renders the JavaScript required to initialise all components client-side. This will
348349 /// attach event handlers to the server-rendered HTML.
349350 /// </summary>
350351 /// <param name="writer">The <see cref="T:System.IO.TextWriter" /> to which the content is written</param>
@@ -371,12 +372,12 @@ public virtual void GetInitJavaScript(TextWriter writer, bool clientOnly = false
371372
372373 /// <summary>
373374 /// Attempts to execute the provided JavaScript code using a non-pooled JavaScript engine (ie.
374- /// creates a new JS engine per-thread). This is because Babel uses a LOT of memory, so we
375+ /// creates a new JS engine per-thread). This is because Babel uses a LOT of memory, so we
375376 /// should completely dispose any engines that have loaded Babel in order to conserve memory.
376- ///
377+ ///
377378 /// If an exception is thrown, retries the execution using a new thread (and hence a new engine)
378379 /// with a larger maximum stack size.
379- /// This is required because JSXTransformer uses a huge stack which ends up being larger
380+ /// This is required because JSXTransformer uses a huge stack which ends up being larger
380381 /// than what ASP.NET allows by default (256 KB).
381382 /// </summary>
382383 /// <typeparam name="T">Type to return from JavaScript call</typeparam>
@@ -396,7 +397,7 @@ public virtual T ExecuteWithBabel<T>(string function, params object[] args)
396397
397398 catch ( Exception )
398399 {
399- // Assume the exception MAY be an "out of stack space" error. Try running the code
400+ // Assume the exception MAY be an "out of stack space" error. Try running the code
400401 // in a different thread with larger stack. If the same exception occurs, we know
401402 // it wasn't a stack space issue.
402403 T result = default ( T ) ;
0 commit comments