react-component / react-component/table

Can't handle React.forwardRef components

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

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
1.4k
Forks
618
Avg merge
10h 19m
Merged PRs (30d)
2

Description

I use a component created by React.forwardRef in my Table.
The table is recreating the component for every table render.

See repo: https://codesandbox.io/s/aged-tree-eut1j

I came accross this bug using mobx-react, in their new version they wrap the component inside a forwardRef I thought the bug was coming from them at first.
https://github.com/mobxjs/mobx-react/issues/777

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 the linked CodeSandbox reproduction and trace how the Table handles a component created with React.forwardRef during rendering. Compare the behavior with a regular component and review the related mobx-react issue for context. Done means the forwardRef component is not recreated on every table render and the reproduction behaves correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
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.