react-component / react-component/notification

项目里如何只在一处地方添加`contextHolder`

Open
#307 0 comments 0 reactions 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

rc-notification v5.0.5
1、多个页面都需要通知,每一处地方都需要添加contextHolder,很是麻烦,且不知是否有冲突。
2、有一些弹窗也需要通知,通知的同时需要关闭弹窗,一旦弹窗关闭了,通知也直接不见了。

因以上2点问题,我想问下有没有办法在根页面添加一次contextHolder后,其他页面直接调用通知就可以了?

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

This is a usage question for rc-notification v5.0.5, centered on contextHolder and notifications triggered from pages or when dialogs close. Start by reviewing the public API and existing documentation or examples; done would require documenting a supported root-level pattern and the expected behavior when the originating dialog closes.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.