react-component / react-component/notification

请教下add()为什么要防止notice重复加入notices队列中

Open
#65 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
384
Forks
118
Avg merge
1h 18m
Merged PRs (30d)
2

Description

const key = notice.key = notice.key || getUuid();
假如 key = getUuid()这不是可以一直不重复吗?这样做的意义什么呢?,
就算有maxCount 的限制也只需要删掉最前面的一个就可以了,这样做的目的是为了什么,性能问题么?
小白请教下

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the implementation of add(), getUuid(), the notices queue, and maxCount handling referenced in the issue. Trace when a notice key is supplied versus generated, then document the rationale for duplicate prevention and queue behavior so the question has a clear answer.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.