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

Passing server: false should change the type #319

Open
posva opened this issue Feb 22, 2024 — with Volta.net · 2 comments
Open

Passing server: false should change the type #319

posva opened this issue Feb 22, 2024 — with Volta.net · 2 comments
Labels
🔄 data-loaders related to Data Loaders ⚡️ enhancement improvement over an existing feature 🔹 typescript issue related to types

Comments

Copy link
Owner

posva commented Feb 22, 2024

Currently only lazy: true sets the return type of data to possibly undefined but server: false should also do it

@posva posva added ⚡️ enhancement improvement over an existing feature 🔄 data-loaders related to Data Loaders 🔹 typescript issue related to types labels Feb 22, 2024 — with Volta.net
@minht11
Copy link

minht11 commented Feb 22, 2024

Currently we use loaders (0.7) in SPA app, it would very annoying if suddenly all those page loaders became possibly undefined inside pages, one of the reasons I chose this library was because of that. I don't think we would need to be server: false, in pure SPA app, so thats interesting disconnect of modes. Would that effect us?

On side note would be there a way to check if the loader used in current page has loader exported as an mitigation? Of cours e using useLoader inside router guards and such would not be safe, but in pages and components it should (?) Not sure if types could be matched with that.

Copy link
Owner Author

posva commented Feb 22, 2024

This won’t affect default usage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔄 data-loaders related to Data Loaders ⚡️ enhancement improvement over an existing feature 🔹 typescript issue related to types
Projects
None yet
Development

No branches or pull requests

2 participants