Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
php server side rendering
import renderVueComponentToString from "vue-server-renderer/basic";
import app from "./app";
app.$store.commit("setUser", { user: context.user });
app.$store.state.features = context.features;
renderVueComponentToString(app, (err, html) => {
if (err) {
throw new Error(err);
}
console.log(html);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment