PARTIAL data update
If you do
router.invalidate(), then all the data from the loader will be reloaded, which is not very effective if there is a lot of data, but only part of it has been updated.
through experimentation, I came to the conclusion that I need to do a hook to work with server functions in order to first receive data from loader, but then update only them.
some server functions:
the hook:
and than use it like this
it works. data is not requested unnecessarily, and in case of changes, only the necessary part of the data is changed.
but
it all looks like overhead… shouldn't such things be solved simply and out of the box, so as not to describe such a structure for each data block?0 Replies