-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed identifier prefix support and added an optional setting to swit…
…ch it on # Added - #34 - Documentation annotations for `ReactConfiguration` # Fixed - #32 - #33 - Code references in Demo project * Added switch for identifier prefix and added support in renderToPipeableStream. * Fixed .net core example * Updated version and nuget packages * Fixed hydration condition based on options * Optional prefix identifier in RenderAsync * Moved upgraded nuget to proper section
- Loading branch information
Showing
7 changed files
with
79 additions
and
22 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,49 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using Forte.Web.React.React; | ||
|
||
namespace Forte.Web.React.Configuration; | ||
|
||
public class ReactConfiguration | ||
{ | ||
/// <summary> | ||
/// Collection of URLs pointing to scripts. | ||
/// </summary> | ||
public List<string> ScriptUrls { get; set; } = new(); | ||
|
||
/// <summary> | ||
/// Indicates whether server-side rendering is globally disabled. Default value is "false". | ||
/// </summary> | ||
public bool IsServerSideDisabled { get; set; } = false; | ||
|
||
/// <summary> | ||
/// Version of React being used. | ||
/// </summary> | ||
public Version ReactVersion { get; set; } = null!; | ||
|
||
/// <summary> | ||
/// Name of the object used to save properties. Default value is "__reactProps". | ||
/// </summary> | ||
public string NameOfObjectToSaveProps { get; set; } = "__reactProps"; | ||
|
||
/// <summary> | ||
/// Indicates whether caching is used. Default value is "true". | ||
/// <remarks> | ||
/// This property specifically controls the usage of an in-process library cache, distinct from the internal Node server cache. | ||
/// </remarks> | ||
/// </summary> | ||
public bool UseCache { get; set; } = true; | ||
|
||
/// <summary> | ||
/// Indicates whether strict mode is enabled. Default value is "false" | ||
/// </summary> | ||
public bool StrictMode { get; set; } = false; | ||
|
||
/// <summary> | ||
/// Ensures a unique identifier prefix for components on both client and server. | ||
/// It avoids conflicts when using multiple roots on the same page and enables the use of the `useId` hook without conflicts if set to `true`. | ||
/// Default value is "false". | ||
/// <remarks>IdentifierPrefix requires React in version 18 or higher and is not supported by <see cref="IReactService.RenderToStringAsync"/> method.</remarks> | ||
/// </summary> | ||
public bool UseIdentifierPrefix { get; set; } = false; | ||
} |
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
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
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
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
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
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