react-component / react-component/util

Portal 组件生命周期讨论

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

Nobody has claimed this yet.

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

Description

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

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

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

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.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.