Closed Hamlet626 closed 10 months ago
Hi, thanks for your report.
I can confirm there seems to be an issue with insights when enabled during server-side rendering environment. While we work on fixing this problem in the library, you could try a workaround by enabling insights in browser environment only:
const isBrowser = typeof window !== 'undefined';
createAutocomplete({
/* ... */,
insights: isBrowser,
});
Hi, thanks for your report.
I can confirm there seems to be an issue with insights when enabled during server-side rendering environment. While we work on fixing this problem in the library, you could try a workaround by enabling insights in browser environment only:
const isBrowser = typeof window !== 'undefined'; createAutocomplete({ /* ... */, insights: isBrowser, });
It works for me, thanks very much for the solution!
Description
It shows the following error when making “insights:true” in createAutocomplete:
my package.json
autocomplete.tsx
Reproduction
I just built a test project for integrating autocomplete with nextJS, like this:
Demo →
Run the Repository →:
npm run dev
go to localhost:3000/test