htmlstreamofficial / preline

Preline UI is an open-source set of prebuilt UI components based on the utility-first Tailwind CSS framework.
https://preline.co
Other
4.9k stars 309 forks source link

NextJS - HSStatic Method init twice at the same time #391

Closed hanafiprasyah closed 5 months ago

hanafiprasyah commented 5 months ago

HSStatic method initialized 2 times at the same time. Is this a bug or installation procedure error?

For NextJS integration and installation methods, you can go to the following page: https://preline.co/docs/frameworks-nextjs.html

If you follow the steps given by the preline team, you will get a bug where the HSStatic method will be initialized twice at the same time. Check this out below:

150428

You can see in the console that the HSStatic method is initialized twice, will this affect the profiling stage?

This is the code provided by the Preline team:

Screenshot 2024-06-14 153408

If I change the block of code like this:

Screenshot 2024-06-14 153626

Then the HSStatic method will only be initialized once, check this out below:

Screenshot 2024-06-14 153820

hanafiprasyah commented 5 months ago

Fixed by today. Just do not use react strict mode. My apologize for opened this issue