-
-
Notifications
You must be signed in to change notification settings - Fork 102
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
syncedCrud: LegendState will attempt to sync when waitFor is back to falsey #391
Comments
No it's great! Keep the issues coming! You're finding scenarios I hadn't thought of. I've just been really busy (gave a talk last night and doing a workshop next week) so I haven't had a chance to dive into them yet. #3 is by design because I hadn't considered a scenario where it would revert back to false. I use that mainly for waiting for authentication or for dependent tables to load first. Can you tell me more about a scenario where waitFor would get set back to false and what would you expect to happen? |
@jmeistrich - basically the app starts in an offline mode (unauthenticated). Sync happens only if you are on a pro plan and authenticated, so if pro plan trial expires or pro plan is not renewed it needs to default back to not syncing checking the flag isPro. Thank you for the awesome work! No pressure, just reporting what I find here 🫡 |
You could add another check within the functions that checks for the pro plan eligibility. That's what I do, since those functions are async anyways. |
@zoltlabs - that's what I currently do - if it's not eligible, I throw and return 403 forbidden - but it would be nice not to see a bunch of errors on the browser console with the sync plugin hitting my sync endpoints endlessly 😬 |
@jmeistrich - apologies for the issue spam I am creating - but I am battle-testing the syncedCrud plugin and came across another unexpected behavior. Consider this scenario:
Is point 3 the expected behavior? 🤔
CleanShot.2024-11-08.at.21.10.14.mp4
The text was updated successfully, but these errors were encountered: