BREAKING: disable runtime JS by default (#55)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/** @jsx h */
|
||||
|
||||
import { h } from "../deps.ts";
|
||||
import { h, PageConfig } from "../deps.ts";
|
||||
|
||||
interface Props {
|
||||
params: Record<string, string | string[]>;
|
||||
@@ -9,3 +9,5 @@ interface Props {
|
||||
export default function Greet(props: Props) {
|
||||
return <div>Hello {props.params.name}</div>;
|
||||
}
|
||||
|
||||
export const config: PageConfig = { runtimeJS: true };
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/** @jsx h */
|
||||
|
||||
import { h, IS_BROWSER, useData } from "../deps.ts";
|
||||
import { h, IS_BROWSER, PageConfig, useData } from "../deps.ts";
|
||||
|
||||
export default function Home() {
|
||||
const message = useData("home", (key) => {
|
||||
@@ -15,3 +15,5 @@ export default function Home() {
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export const config: PageConfig = { runtimeJS: true };
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
/** @jsx h */
|
||||
|
||||
import { h, PageProps } from "../../deps.ts";
|
||||
import { h, PageConfig, PageProps } from "../../deps.ts";
|
||||
|
||||
export default function Home(props: PageProps) {
|
||||
return <div>{JSON.stringify(props)}</div>;
|
||||
}
|
||||
|
||||
export const config: PageConfig = { runtimeJS: true };
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
/** @jsx h */
|
||||
|
||||
import { h, PageConfig } from "../deps.ts";
|
||||
import { h } from "../deps.ts";
|
||||
|
||||
export default function StaticPage() {
|
||||
return <p>This is a static page.</p>;
|
||||
}
|
||||
|
||||
export const config: PageConfig = { runtimeJS: false };
|
||||
|
||||
Reference in New Issue
Block a user