Cannot render nested data returned by UseTracker in Meteor - ReactJS

Active3 hr before
Viewed126 times

7 Answers


Connect and share knowledge within a single location that is structured and easy to search.,I have a functional component that gets data using UseTracker(). The data returned is a single 'Wine' object and an array of related 'Recipe' objects (the join is done in the publication). Both object types have nested arrays and objects within them:, I want to build an all metal, self-designed building. Are metal frame and joists really that infeasible?

 Pretag team - issue, fix, solve, resolve


renderApples() {
  return => (
    <Apple key={apple._id}
        oranges={Oranges.find({appleId: apple._id}).fetch()} />
load more v
72%,Your example might be a little too contrived - why are you using setState from within useTracker?,The issue occurred in 2.2.2. The issue not exists in 2.1.4.

import React, { useState } from 'react';
import { useTracker } from 'meteor/react-meteor-data';

export const App = () => {
  const [s, setS] = useState(false);
  useTracker(() => {
    //to trigger rerender
  }, []);

  const links = useTracker(() => [], []);

  //BUG, because the 'links' must always be 'array'
  if (links === undefined) {
    console.error(`links === undefined`);//for 2d render it equals undefined

  return (
      <h2>Links count:{links.length}</h2>
load more v

 Pretag team - issue, fix, solve, resolve

meteor create --react app and --typescript now use useTracker hook instead of withTracker HOC, it also uses function components instead of classes.,The server-render package now supports passing a Stream object to ServerSink methods that previously expected a string, which enables streaming server-side rendering with React 16:,The spiderable package now reports the URL it's trying to fetch on failure.

  • Clone the package repository into your application's imports directory, make any modifications necessary, then use npm install to link the-package into node_modules:
meteor npm install imports / the - package
load more v

Migrating to Meteor 1.7 , Using npm Packages , Writing npm Packages

To install React in Meteor should add it as a npm dependency:

meteor npm install--save react react - dom
load more v

 Pretag team - issue, fix, solve, resolve

Other "returned-usetracker" queries related to "Cannot render nested data returned by UseTracker in Meteor - ReactJS"