eBay / eBay/nice-modal-react

The modal still visible after remove

Open
#168 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2.3k
Forks
127
PR merge metrics
No merged PRs in 30d

Description

I faced the problem that after call modal.remove(), the modal is still visible even when the visible is false (i log the modal object from useModal). But when I use modal.hide() the modal is disappear. It is so confusing for me. Anyone can explain for me ?

Another question I would like to ask is that because we nest the App in ModalProvider so each time we show or hide or remove modal, the context change. Will application be rerendered every times ?

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 reproducing the difference between modal.remove() and modal.hide() using the useModal API, then inspect the modal lifecycle and ModalProvider context behavior. No source file or test is named in the issue; done should include a clear explanation or confirmed fix for removal visibility and whether provider consumers rerender.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.