why Component is dynamic

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

Nobody has claimed this yet.

Assessment

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

Research direction

Read src/Upload.jsx around line 61 and inspect how Component is assigned in didMount. Compare that timing with the linked ant-design-vue issue about position calculation before content loads, then determine whether the current initialization is intentional or needs a change; done means the timing rationale or required behavior is documented in the issue.

Written by the indexing model from the issue text.

Description

https://github.com/react-component/upload/blob/2e6e8085c4f5da922bcc1c8f00aa369892f5b52c/src/Upload.jsx#L61

state = {
    Component: null,
  }

为什么不直接赋值,而是在didMount中赋值,是基于什么样的考虑

state = {
    Component: this.getComponent(),
  }

ref, https://github.com/vueComponent/ant-design-vue/issues/780 位置计算错误,原因是计算时内容尚未加载

Dominant language
TypeScript
Stars
804
Forks
323
Avg merge
12m
Merged PRs (30d)
1

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/upload

All issues in react-component/upload

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.