All, thanks for your help. I’m looking at the documentation for server-render at https://docs.meteor.com/packages/server-render.html and I just feel like I’m coming up empty. For example:
import React from "react";
import { renderToString } from "react-dom/server";
import { onPageLoad } from "meteor/server-render";
import App from "/imports/Server.js";
onPageLoad(sink => {
sink.renderIntoElementById("app", renderToString(
<App location={sink.request.url} />
));
});
It shows us importing App
from /imports/Server.js
but what does that do? Is that a router? If not, what is it? We can see this on the client example too:
import React from "react";
import ReactDOM from "react-dom";
import { onPageLoad } from "meteor/server-render";
onPageLoad(async sink => {
const App = (await import("/imports/Client.js")).default;
ReactDOM.hydrate(
<App />,
document.getElementById("app")
);
});
What is imports/Client.js
? Is that a router? Is it a container? What is it? What is it for?
Sorry for my frustration but because there’s no mention of routing and no mention of what those files do, I’m very confused.