Meituan-Dianping / Meituan-Dianping/beeshell

TreeView组件 按照官方demo 显示异常

Open
#65 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
1.8k
Forks
285
PR merge metrics
No merged PRs in 30d

Description

首次渲染页面没问题,点击根目录后就会报错。就是说 不显示子节点。

`Invariant Violation: Text strings must be rendered within a component.

This error is located at:
in RCTView (at View.js:35)
in View (at createAnimatedComponent.js:151)
in AnimatedComponent (at TouchableOpacity.js:308)
in TouchableOpacity (created by TreeView)
in RCTView (at View.js:35)
in View (created by TreeView)
in RCTView (at View.js:35)
in View (created by TreeView)
in RCTView (at View.js:35)
in View (created by TreeView)
in RCTView (at View.js:35)
in View (created by TreeView)
in RCTView (at View.js:35)
in View (created by TreeView)
in TreeView (at treeView.js:42)
in TreeViewScreen
in RCTView (at View.js:35)
in View
in Unknown (at renderApplication.js:40)
in RCTView (at View.js:35)
in View (at AppContainer.js:98)
in RCTView (at View.js:35)
in View (at AppContainer.js:115)
in AppContainer (at renderApplication.js:39)`

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 issue from the official TreeView demo: render the tree and tap the root directory. Inspect the TreeView component around treeView.js:42 and follow the failing child-node render associated with the reported Text invariant. Done means expanding the root displays its child nodes without the error.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.