2
0

🐛 Fix bubble proper cleanup function

This commit is contained in:
Baptiste Arnaud
2023-02-21 19:43:18 +01:00
parent 148315f6ee
commit 541dcd2bb7
3 changed files with 5 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@typebot.io/react",
"version": "0.0.10",
"version": "0.0.11",
"description": "React library to display typebots on your website",
"main": "dist/index.js",
"types": "dist/index.d.ts",

View File

@ -25,6 +25,9 @@ export const Bubble = (props: Props) => {
await import('@typebot.io/js/dist/web')
setIsInitialized(true)
})()
return () => {
ref.current?.remove()
}
}, [])
const attachBubbleToDom = useCallback((props: Props) => {