Skip to content

Commit bc120b4

Browse files
committed
Make it the example cleaner
1 parent 41af48d commit bc120b4

File tree

1 file changed

+2
-2
lines changed
  • examples/react/start-streaming-data-from-server-functions/src/routes

1 file changed

+2
-2
lines changed

examples/react/start-streaming-data-from-server-functions/src/routes/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ function RouteComponent() {
128128

129129
const getResponseFromTheAsyncGenerator = useCallback(async () => {
130130
setAsyncGeneratorFuncMessages('')
131-
for await (const m of await streamingWithAnAsyncGeneratorFn()) {
132-
const chunk = m?.choices[0].delta.content
131+
for await (const msg of await streamingWithAnAsyncGeneratorFn()) {
132+
const chunk = msg?.choices[0].delta.content
133133
if (chunk) {
134134
setAsyncGeneratorFuncMessages((prev) => prev + chunk)
135135
}

0 commit comments

Comments
 (0)