Fix Build Errors: TanStack Query requires different onClick 5a8c6f3b
Maximilian Leodolter · 2025-08-04 12:38 5 file(s) · +5 −5
src/templates/extras/client/src/App.tsx/App-with-rpc-tanstackquery.tsx +1 −1
43 43
			<p>A typesafe fullstack monorepo</p>
44 44
			<div className="card">
45 45
				<div className="button-container">
46 -
					<button onClick={sendRequest}>Call API</button>
46 +
					<button onClick={() => sendRequest()}>Call API</button>
47 47
					<a className="docs-link" target="_blank" href="https://bhvr.dev">
48 48
						Docs
49 49
					</a>
src/templates/extras/client/src/App.tsx/App-with-tailwind-rpc-tanstackquery.tsx +1 −1
44 44
			<p>A typesafe fullstack monorepo</p>
45 45
			<div className="flex items-center gap-4">
46 46
				<button
47 -
					onClick={sendRequest}
47 +
					onClick={() => sendRequest()}
48 48
					className="bg-black text-white px-2.5 py-1.5 rounded-md"
49 49
				>
50 50
					Call API
src/templates/extras/client/src/App.tsx/App-with-tailwind-shadcn-rpc-tanstackquery.tsx +1 −1
44 44
			<h2 className="text-2xl font-bold">Bun + Hono + Vite + React</h2>
45 45
			<p>A typesafe fullstack monorepo</p>
46 46
			<div className="flex items-center gap-4">
47 -
				<Button onClick={sendRequest}>Call API</Button>
47 +
				<Button onClick={() => sendRequest()}>Call API</Button>
48 48
				<Button variant="secondary" asChild>
49 49
					<a target="_blank" href="https://bhvr.dev">
50 50
						Docs
src/templates/extras/client/src/App.tsx/App-with-tailwind-shadcn-tanstackquery.tsx +1 −1
34 34
			<h2 className="text-2xl font-bold">Bun + Hono + Vite + React</h2>
35 35
			<p>A typesafe fullstack monorepo</p>
36 36
			<div className="flex items-center gap-4">
37 -
				<Button onClick={sendRequest}>Call API</Button>
37 +
				<Button onClick={() => sendRequest()}>Call API</Button>
38 38
				<Button variant="secondary" asChild>
39 39
					<a target="_blank" href="https://bhvr.dev">
40 40
						Docs
src/templates/extras/client/src/App.tsx/App-with-tailwind-tanstackquery.tsx +1 −1
34 34
			<p>A typesafe fullstack monorepo</p>
35 35
			<div className="flex items-center gap-4">
36 36
				<button
37 -
					onClick={sendRequest}
37 +
					onClick={() => sendRequest()}
38 38
					className="bg-black text-white px-2.5 py-1.5 rounded-md"
39 39
				>
40 40
					Call API