From 3125fbed59900cb750c6adacdd62c35b3a4ffcba Mon Sep 17 00:00:00 2001 From: Shinya Fujino Date: Sun, 2 Nov 2025 12:03:49 +0900 Subject: [PATCH] docs: fix typo and clarify generateFunctionId example --- docs/start/framework/react/guide/server-functions.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/start/framework/react/guide/server-functions.md b/docs/start/framework/react/guide/server-functions.md index a94c0558180..151360176db 100644 --- a/docs/start/framework/react/guide/server-functions.md +++ b/docs/start/framework/react/guide/server-functions.md @@ -241,7 +241,7 @@ You can customize function ID generation for the production build by providing a Prefer deterministic inputs (filename + functionName) so IDs remain stable between builds. -Please note that this customization is **experimental** und subject to change. +Please note that this customization is **experimental** and subject to change. Example: @@ -256,12 +256,14 @@ export default defineConfig({ tanstackStart({ serverFns: { generateFunctionId: ({ filename, functionName }) => { - // Return a custom ID string. If you return undefined, the default is used. + // Return a custom ID string return crypto .createHash('sha1') .update(`${filename}--${functionName}`) .digest('hex') - return undefined + + // If you return undefined, the default is used + // return undefined }, }, }),