react-component / react-component/util

react-dom没有导出 render这个方法 我使用antd的点击事件几乎都会报错

Open
#607 3 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

源代码位置
https://github.com/react-component/util/blob/master/src/React/render.ts
第17行

const { version, render: reactRender, unmountComponentAtNode } = fullClone;

这是编译过后的报错代码
import * as ReactDOM from 'react-dom';

var fullClone = _objectSpread({}, ReactDOM);

var version = fullClone.version,
reactRender = fullClone.render,

function legacyRender(node, container) {
reactRender(node, container);
}

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 with src/React/render.ts at line 17 and compare the ReactDOM exports available in the affected React version with the destructuring shown in the issue. Reproduce the antd click-event error, then verify that the render utility works without the reported runtime failure across the supported setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.