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

Lazy Loading #19

Open
goenning opened this issue Aug 21, 2022 · 3 comments
Open

Lazy Loading #19

goenning opened this issue Aug 21, 2022 · 3 comments

Comments

@goenning
Copy link

Is it possible to lazy load this package?

My use case is that most users will never see a toast, so I don’t want them to pay the price of extra JS unnecessarily

it’s pretty easy to lazy load the “toast” object, but the problem is the Toaster container. I’ll try do It by dynamically attaching it to the DOM on first use (maybe using Solid Portal?), but in case someone already solved this, please share 😊

@ardeora
Copy link
Owner

ardeora commented Aug 26, 2022

I apologise I haven't had time to look at this. Are you aware of any other UI libraries leveraging lazy loading? I would love to take a look and see if we can get it working with Solid Toast

@goenning
Copy link
Author

React Toastify: fkhadra/react-toastify#276

I did that in 2018, so things might have changed/improved since

@ardeora
Copy link
Owner

ardeora commented Aug 27, 2022

Ooh awesome! This is a really helpful example. I'll take a look and follow back with ideas.

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