The useInbox and useOutbox hooks rely on the useCollection hook. This hook automatically fetch the given collection.
The problem is that, in many cases, we use useOutbox only to post new activities. Furthermore, fetching the outbox can take a lot of time (there are performance issues until we solve https://github.com/assemblee-virtuelle/semapps/issues/568). So we do something that is completely useless.
I suggest to add a new option to the useCollection hook to disable the automatic fetch. We should also add a fetch to do the fetch if we need to.
The
useInbox
anduseOutbox
hooks rely on theuseCollection
hook. This hook automatically fetch the given collection.The problem is that, in many cases, we use
useOutbox
only to post new activities. Furthermore, fetching the outbox can take a lot of time (there are performance issues until we solve https://github.com/assemblee-virtuelle/semapps/issues/568). So we do something that is completely useless.I suggest to add a new option to the
useCollection
hook to disable the automatic fetch. We should also add afetch
to do the fetch if we need to.