React4XP - Configuration - Run time
Contents
Application configuration file
$XP_HOME/config/<app.name>.cfg
hydrate
Hydration is enabled by default, to change the default to disabled add the line below to ${XP_HOME}/config/${app}.cfg. One can still enable hydration in specific components.
react4xp.hydrate = false
ssr
SSR is enabled by default, to change the default to disabled add the line below to ${XP_HOME}/config/${app}.cfg. One can still enable ssr in specific components.
react4xp.ssr = false
React4xp doesn’t fully support clientSide rendering of components in regions. So the default for pages and layouts will still be ssr. You can test how your page of layout renders clientSide by passing ssr: false as an option to the render function in your page or layout controller. |
ssrMaxThreads
react4xp.ssr.maxThreads = 5
If this override value is not set, the number of threads (renderers) used for simultaneous SSR requests is determined by java, by…
Runtime.getRuntime().availableProcessors()
…but ssrMaxThreads
sets this number manually instead.
serveGlobals
React4xp builds a globals bundle, which MUST contain all assets NEEDED to render server-side. By default it contains react and react-dom, but more assets can be added.
By default the globals bundle is also provided to the client-side, but you can disable the serving of the globals bundle to the client-side by adding the following to ${XP_HOME}/config/${app}.cfg.
react4xp.serveGlobals = false
Note: Keep in mind the assets in the globals bundle are still REQUIRED for clientSide rendering to work, so you have to provide those assets by other means, for example via CDN.
urlType
This feature was introduced in React4XP-5.1.0 |
URL type. Either server (server-relative URL) or absolute. Default is server.
react4xp.urlType = absolute