assemblee-virtuelle / semapps

A toolbox to create semantic web applications
https://semapps.org
Apache License 2.0
88 stars 9 forks source link

useInbox and useOutbox: allow not to fetch inbox #1325

Open srosset81 opened 3 weeks ago

srosset81 commented 3 weeks ago

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.