-
-
Notifications
You must be signed in to change notification settings - Fork 111
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
[Bug] NextJs Window not defined issue #32
Comments
Hi @tjtanjin , `// Lazy load the components from react-chatbotify const getDefaultBotOptions = lazy(() => import('react-chatbotify').then(mod => mod.getDefaultBotOptions)); const BotOptionsContext = lazy(() => import('react-chatbotify').then(mod => mod.BotOptionsContext)); |
@kavin-bytive Ok so it's a little hard to read with the formatting above 😰 From what I can make off the stuffs above, you can try the following:
|
error on loading
228 | |
sorry for bad formatting, i have edited it :P |
@kavin-bytive Give this a try:
|
tried this, but still getting same error @tjtanjin |
|
@tjtanjin finally it worked, above codebase i have shared is working fine by moving things to use-effect https://github.com/tjtanjin/react-chatbotify/issues/32#issuecomment-2054187127, i missed to remove the import from another file, due to which it was not working. thanks again for quick response and creating this amazing package. |
Bug Description
Code Snippet
as per given solution in this issue https://github.com/tjtanjin/react-chatbotify/issues/19
it works to import the
ChatBot
but i am also usinggetDefaultBotOptions
andBotOptionsContext
and they are not working while trying with lazy function.The text was updated successfully, but these errors were encountered: