BREAKING: disable runtime JS by default (#55)

This commit is contained in:
Luca Casonato
2021-09-25 11:05:49 +02:00
committed by GitHub
parent f44f1950dc
commit 0fbc9e816a
7 changed files with 24 additions and 14 deletions
+10 -6
View File
@@ -19,13 +19,17 @@ export interface PageProps {
export interface PageConfig {
/**
* Setting this flag to `false` disables all client side runtime JS. This
* means that all interactivity on the client that depends on Preact or other
* JS code will not function. This option is set to `true` (runtime javascript
* is enabled) by default.
* By default, runtime JS is disabled. This means that interactivity on the
* client that depends on Preact or other JS code will not function.
*
* It is recommended to disable runtime JavaScript for static pages that do
* not require interactivity, like marketing or blog pages.
* Runtime JS can be enabled by setting `runtimeJS` to `true`.
*
* It is recommended to keep runtime JavaScript disabled for static pages that
* do not require interactivity, like marketing or blog pages.
*
* Note that the runtime JS feature will likely be overhauled in the future to
* provide more granular control over which components need to be hydrated on
* the client.
*/
runtimeJS?: boolean;
}