-
Notifications
You must be signed in to change notification settings - Fork 9
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
feat: supports reloading beforeSend for next/react/remix #83
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: npm/@testing-library/[email protected], npm/@testing-library/[email protected], npm/@types/[email protected] |
rerender(<SpeedInsights beforeSend={beforeSend} />); | ||
expect(window.siq).toHaveLength(0); | ||
|
||
rerender(<SpeedInsights beforeSend={beforeSend2} />); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you for the testing!!
@@ -8,6 +8,10 @@ export function SpeedInsights( | |||
framework?: string; | |||
}, | |||
): JSX.Element | null { | |||
useEffect(() => { | |||
window.si?.('beforeSend', props.beforeSend); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: should we only set if its not undefined?
🖖 What's in there?
Supports updating
beforeSend
in next/react/remix components.🤺 How to test?
I made some unit tests for this.
🔬Notes to reviewers
We don't think it worth supporting this with astro/sveltekit/vue/nuxt. Let's wait for use cases first.