meteor / meteor/react-packages

Suspense throws undefined error

Open
#413 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

  • #414 by @ToastHawaii — closed without merging
Dominant language
JavaScript
Stars
575
Forks
168
Avg merge
4d 3h
Merged PRs (30d)
1

Description

We upgrade from a very old projekt ([Openki](https://gitlab.com/Openki/Openki)). We started with blaze and iron router and now migrate to react, async await and meteor v3 step by step. ([Working Branch](https://gitlab.com/Openki/Openki/-/commits/dev-meteorv3))

Currently we found out that we need `react-meteor-data/suspense` to support some async await calls on loading data.

If a change happend in the UI the render breaks and [`if ('error' in cachedSubscription) throw cachedSubscription.error`](https://github.com/meteor/react-packages/blob/master/packages/react-meteor-data/suspense/useSubscribe.ts#L38) is thrown with a `undefined`.

I gues it happens because we have mixed up a lot of diffrend librarys with diffrent Tracker in it and something is not update nice. We use blaze, react, react in blaze, iron-router (fixed for v3),

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 useSubscribe.ts location, especially the cachedSubscription error path, and reproduce the failure when the UI changes in the Openki dev-meteorv3 branch. Compare the involved Tracker-based libraries and determine why the thrown error is undefined; done means the render no longer breaks and the failure is covered by a reproducible check.

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
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.