Hi,
with Meteor 3, I’m doing SSR, and doing query from MongoDB 3.x database. But, renderIntoElementById does not wait for query results, so how I can get query results to show at webpage?
I’m trying to use MongoDB 3.x in package.json, because MongoDB 5.x and newer requires CPU to support AVX, so releasing Snap update would not work on some hardware, and also Sandstorm still uses MongoDB 3.x.
With a simple server side query can you console log results? This is just to eliminate SSR entirely and make sure DB is ok. There are benchmark tests such as this one (MongoDB Benchmark 3.4 vs 4.4 vs 5.0 vs 6.0 | by Yicheng Zhou | SerpApi | Medium) showing V3 as being the fastest so maybe response time from DB is not the issue, unless there is some incompatibility between the driver version and the DB version.
It must be handled by the UI/front-end framework thay you are using.
As an example, in React, there is the new use() function that suspends itself until the data source promise is resolved. Without the built-in awaiting of async functions, all data sources will be unresolved promises on the first run