theKashey / react-imported-component

✂️📦Bundler-independent solution for SSR-friendly code-splitting
MIT License
663 stars 39 forks source link

Using `useImported` hook causing infinite rerender #235

Open PawanKolhe opened 4 months ago

PawanKolhe commented 4 months ago

@theKashey Using useImported hook inside any component is causing the component to infinite rerender.

You can follow the example given in README file to reproduce.

theKashey commented 4 months ago

Sounds like a babel plugin problem. You may useMemo the import function to mitigate the problem.

Probably some error reporting around this moment is very missing.