Skip to content
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

Using react-imported-component with react 18 #228

Closed
KoderFPV opened this issue Jun 1, 2023 · 3 comments
Closed

Using react-imported-component with react 18 #228

KoderFPV opened this issue Jun 1, 2023 · 3 comments

Comments

@KoderFPV
Copy link

KoderFPV commented Jun 1, 2023

Hi,

Do you know guys if this library still needed in react 18? We are during migration process to R18 and we wonder if we should replace this library with react 18 native lazy loading support, what we allready attempt, but with no success :)

@theKashey
Copy link
Owner

React 18 can "hold" information inside Suspense boundaries while code is loading, but any update will invalidate it. It is very low-level behavior and I would not rely much on in - facebook/react#22692

However if you don't use SSR - then it's totally not a problem, and if you don't use useImported - moving to Lazy would basically change nothing, just one library less to load.

Hey, there is no such thing as "native lazy loading" - it's only about Suspense and everything else does not matter that much.

@KoderFPV
Copy link
Author

KoderFPV commented Feb 5, 2024

@theKashey I needed nearly a year to understand that R18 does not provide all utilities to have lazy imports working properly between server and client thanks!

@theKashey
Copy link
Owner

Always at your service

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants