Skip to content

Instantly share code, notes, and snippets.

@gabrielEloy
Last active July 4, 2021 02:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gabrielEloy/4d1c4bedc3879e92a9da66046d6b2114 to your computer and use it in GitHub Desktop.
Save gabrielEloy/4d1c4bedc3879e92a9da66046d6b2114 to your computer and use it in GitHub Desktop.
//pre-existing imports here
import { encodeParseQuery } from "@parse/react-ssr";
import Parse from "parse";
export async function getServerSideProps() {
const parseQuery = new Parse.Query("Message");
return {
props: {
parseQuery: await encodeParseQuery(parseQuery), // Return encoded Parse Query for server side rendering
},
};
}
//pre existing code here
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment