Cleaned dead code and updated documents
This commit is contained in:
@@ -1,29 +0,0 @@
|
||||
/**
|
||||
* Test SSR worker — registers simple components for the test suite.
|
||||
*/
|
||||
|
||||
import { registerComponent } from './worker'
|
||||
|
||||
// Simple component that renders props
|
||||
function Hello({ name }: { name: string }) {
|
||||
return <div>Hello, {name}!</div>
|
||||
}
|
||||
|
||||
// Component that renders a list
|
||||
function UserProfile({ user_id, name }: { user_id: number; name: string }) {
|
||||
return (
|
||||
<div className="profile">
|
||||
<h1>{name}</h1>
|
||||
<span>ID: {user_id}</span>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
// Component that throws during render
|
||||
function Broken() {
|
||||
throw new Error('Intentional render error')
|
||||
}
|
||||
|
||||
registerComponent('Hello', Hello)
|
||||
registerComponent('UserProfile', UserProfile)
|
||||
registerComponent('Broken', Broken)
|
||||
Reference in New Issue
Block a user