Skip to content

Render race condition with MDCCached found with Nuxt Chat #384

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ChrisTowles opened this issue Apr 25, 2025 · 0 comments · May be fixed by #385
Open

Render race condition with MDCCached found with Nuxt Chat #384

ChrisTowles opened this issue Apr 25, 2025 · 0 comments · May be fixed by #385

Comments

@ChrisTowles
Copy link

ChrisTowles commented Apr 25, 2025

I've believed i found and tracked down an issue in MDCCached caused by the watch getting out of sync.

Reproduction

  • navigate to running the Nuxt UI chat-template
  • use one of the labels to start a chat and if first time rendered everything works.
  • now start a new chat using the same label
  • that chat response from cloudflare will be cached and return almost immediately.
  • the result will be the prop value and data will no longer match.
  • presents it self as no loading and no rendered visible text in the component.

Resolution

watch(() => props.value, () => {
  refresh()
})

updated to include immediate prevents the values from getting out of sync.

watch(() => props.value, () => {
  refresh()
}, { immediate: true })

PR #385

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant