meteor / meteor/react-packages

useTracker renders two times at mount, would be nice if it renders only once

Open
#439 6 comments 1 reaction 0 assignees View on GitHub

@Poyoman39 is already working on this.

Since Apr 10, 2025.

  • #436 by @Poyoman39 — open
  • #440 by @Poyoman39 — open
bug
Dominant language
JavaScript
Stars
575
Forks
168
Avg merge
4d 3h
Merged PRs (30d)
1

Description

This code renders two times

```
const Test = ({ afterMountInc = false }) => {
renderCount++;
console.log(renderCount);
value = useTracker(() => {
return null;
}, []);
return {renderCount};
};

ReactDOM.render(, 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

Review linked pull requests #436 and #440 before starting, then reproduce the report with the supplied Test component, useTracker call, and ReactDOM.render entry point. Done means the component renders once at mount while preserving the reported useTracker behavior.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.