-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
88 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,23 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "ESNext", | ||
"module": "ESNext", | ||
"moduleResolution": "Bundler", | ||
"allowSyntheticDefaultImports": true, | ||
"esModuleInterop": true, | ||
"allowJs": true, | ||
"checkJs": true, | ||
"noEmit": false, | ||
"jsx": "react-jsx", | ||
"isolatedModules": true, | ||
"strict": true, | ||
"declarationMap": true, | ||
"declaration": true, | ||
"skipLibCheck": true, | ||
"emitDeclarationOnly": true, | ||
"types": [ | ||
"react/experimental", | ||
"react-dom/experimental", | ||
"vinxi/types/client" | ||
], | ||
"outDir": "./dist/types" | ||
}, | ||
"include": [ | ||
"./mount.jsx", | ||
"./index.js" | ||
] | ||
"compilerOptions": { | ||
"target": "ESNext", | ||
"module": "ESNext", | ||
"moduleResolution": "Bundler", | ||
"allowSyntheticDefaultImports": true, | ||
"esModuleInterop": true, | ||
"allowJs": true, | ||
"checkJs": true, | ||
"noEmit": false, | ||
"jsx": "preserve", | ||
"jsxImportSource": "solid-js", | ||
"isolatedModules": true, | ||
"strict": true, | ||
"declarationMap": true, | ||
"declaration": true, | ||
"skipLibCheck": true, | ||
"emitDeclarationOnly": true, | ||
"types": ["vinxi/types/client"], | ||
"outDir": "./dist/types" | ||
}, | ||
"include": ["./mount.jsx", "./index.js"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
async function greetServer(name: string) { | ||
"use server"; | ||
console.log(`Hi, server. My name is ${name}.`); | ||
} | ||
|
||
export function App() { | ||
return ( | ||
<div> | ||
<button onClick={() => greetServer("client")} data-test-id="button"> | ||
Greet Server | ||
</button> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,5 @@ | ||
/// <reference types="vinxi/types/client" /> | ||
import ReactDOM from "react-dom/client"; | ||
import { App } from "./App"; | ||
|
||
async function greetServer(name: string) { | ||
"use server"; | ||
console.log(`Hi, server. My name is ${name}.`); | ||
} | ||
|
||
ReactDOM.createRoot(document.getElementById("root")).render( | ||
<div> | ||
<button onClick={() => greetServer("client")} data-test-id="button">Greet Server</button> | ||
</div>, | ||
); | ||
ReactDOM.createRoot(document.getElementById("root")).render(<App />); |