useSubmission pending state resolves on url change?
i have some optimistic ui, with roughly the following structure:
then somewhere else i use
the weird thing is, when i include the logic above with the
if instead i wait to
wondering if this is expected, or perhaps i'm doing something wrong? I can post code tomorrow if this doesn't make sense, thanks!
then somewhere else i use
useSubmission(save) and disable buttons based on pending state as i don't want user's editing lists that aren't accurate to server state.the weird thing is, when i include the logic above with the
**, the useSubmission state basically dies. it returns to undefined, and my buttons are don't disabledif instead i wait to
set view -> "read" until after i've checked the result of the server call, then the pending state works perfectly (which i can't really do, otherwise the illusion of the optimistic ui is gone)wondering if this is expected, or perhaps i'm doing something wrong? I can post code tomorrow if this doesn't make sense, thanks!
