This commit is contained in:
2026-04-14 11:25:25 +08:00
parent 4cf060136d
commit a0c48937ad
9 changed files with 94 additions and 23 deletions

View File

@@ -1,3 +1,4 @@
"use client";
import { useEffect } from "react";
export default function List() {

View File

@@ -0,0 +1,8 @@
// Server component - no 'use client' directive
export default function ServerList() {
return (
<div>
<h1>Server List</h1>
</div>
);
}

View File

@@ -0,0 +1,18 @@
'use server';
import { useEffect } from "react";
const getVersion = async () => {
await new Promise(resolve => setTimeout(resolve, 1000));
return '1.0.0';
}
export default async function List() {
const v = await getVersion();
return (
<div>
<h1>List - Version {v}</h1>
<div style={{
width: 200
}}>Primary Button</div>
</div>
);
}