-
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
can't identify subscriptions for v5 #13
Comments
Thank you for submitting this issue! We, the Members of Meteor Community Packages take every issue seriously. However, we contribute to these packages mostly in our free time. If you think this issue is trivial to solve, don't hesitate to submit Please also consider sponsoring the maintainers of the package. |
@welkinwong That is actually an artifact that I should have removed and shouldn't be there. Meteor.subscribe would need to be called during server rendering to work for sending data to the client in this manner. Currently I have not dove into server rendering as I think it's going to take some mental gymnastics to wrap my head around how waiting on Meteor.subscribe to finish will work, when you can't actually await a call to Meteor.subscribe. |
@welkinwong are you using server rendering in your projects where you will need Meteor.subscribe to work in this manner? |
my project look like: routes.ts export const Routes = [
...
{ path: '/path', Component: Page },
...
] Page.ts import { useTracker } from 'meteor/react-meteor-data/suspense
// here is use suspense, because meteor3.0 need use fetchAsync on server
export const Page = () => {
const docs = useTracker('docsList', () => {
Meteor.subscribe('docs');
return DocsCollection.find({}).fetchAsync();
});
return (
<div>
{docs.map(doc =>
<ListItem key={doc.id} doc={doc} />
)}
</div>
);
} when access domain.com/path, the page will ssr output |
So you are using SSR then? Are you using a package or is it a custom implementation? |
yes i using SSR, only |
@welkinwong are you using a custom SSR implementation? |
yes, actually I follow this package |
Got it. I should start work on that package along side getting Meteor.subscribe to work |
@copleykj I just wanted to ask if v5 is already working for the standard cases (like Meteor.userId())? I've added the package, but
|
Just added a pull request. There was a missing await before |
@dnish published v5.0.0-beta.1 with your changes and a couple other little fixes. |
Describe the bug
when just use Meteor.subscribe, FastRender not inject data
To Reproduce
Steps to reproduce the behavior:
meteor-fast-render/testApp/server/main.js
Expected behavior
only
Meteor.subscribe('links')
maby workScreenshots
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: