assemblee-virtuelle / assemblee-virtuelle/semapps

useInbox and useOutbox: allow not to fetch inbox

Open
#1,325 0 comments 0 reactions 0 assignees View on GitHub
easy good first issue
Dominant language
TypeScript
Stars
103
Forks
14
Avg merge
1m
Merged PRs (30d)
2

Description

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.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the useCollection hook and its useInbox and useOutbox callers, then trace where the given collection is automatically fetched. The work is done when callers can disable that fetch and explicitly trigger it when needed, while existing behavior remains available for other uses.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.