Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Portal 组件生命周期讨论

Open
#134 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Refactor
Clarity
Needs clarification
Activity status
Stale
Tech stack
react, typescript
Domain
frontend

Research direction

Read src/Portal.js at the linked line and trace how createContainer, constructor, and didUpdate currently affect child instantiation. Compare the lifecycle options and establish the intended behavior before making any change; done requires a decided approach and agreement on the resulting lifecycle behavior.

Written by the indexing model from the issue text.

Description

这个组件的 createContainer 放在 constructor 会不会更合理些,看目前的方案,children 一开始不会实例化,必须在 didUpdate 后处理

https://github.com/react-component/util/blob/461ee5ab8df29d4ed2cce64ec41f8e4d92831821/src/Portal.js#L6

Dominant language
TypeScript
Stars
670
Forks
205
Avg merge
15d 17h
Merged PRs (30d)
6

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.

More from react-component/util

All issues in react-component/util

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.