meteor / meteor/react-packages

After upgrading to react v18, components rendered through react-template-helper does not get latest value of ReactiveVar

Open
#399 0 comments 1 reaction 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
575
Forks
168
Avg merge
4d 3h
Merged PRs (30d)
1

Description

Hello everyone,

We've recently upgraded to React v18 and also updated to latest version of `react-template-helper` and have encountered an issue that requires some attention.

In our previous setup with React 16, we used to pass `ReactiveVars` as props, and the `.get()` method reliably provided us with the updated value of the ReactiveVar. However, after transitioning to React 18, our components stopped rendering as expected. Notably, in React 16, we depended on `componentWillReceiveProps`, but in React 18, it appears that even `UNSAFE_componentWillReceiveProps` isn't getting triggered.

To help you better understand the problem, we've created a repository that reproduces this issue. You can find it here: [Repo that reproduces this bug](https://github.com/yash-indecab/meteor-react-template-helper-bug-reproduce).

We would greatly appreciate any assistance or insights you can provide. Our aim is to resolve this issue and continue working effectively with React v18. Thank you for your help.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by running the reproduction repository linked in the issue with React 18 and the latest react-template-helper, then compare how the ReactiveVar is passed and read against the reported React 16 behavior. Done means components rendered through react-template-helper receive the latest ReactiveVar value and render the updated result.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 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.