Closed modosc closed 4 years ago
Not sure if this is really relevant to the library but rather an implementation detail. If you think that the defer actions have to wait for data that should be retrieved by the fetch actions then yeah, your proposal is correct. In my experience, most defer actions are not related directly to the main fetch actions but rather for different components that the router handler tries to render and hence triggering it on the client right after the fetch actions (if not first time) makes your rendering more robust and fast.
i only mention it because we ran into some issues with it. since this boilerplate is copied all over the place it would be nice to either change it to something the above or at least make a note since it's a subtle bug.
from the client example:
to me it makes more sense to wait on the
defer
hooks until after thefetch
hooks resolve - this way both the client and server renders behave the same:i realize i'm free to do this on my own (and i have), just wondering if this was intentional or not.
thanks!