Skip to content

Instantly share code, notes, and snippets.

@tilomitra
Last active June 13, 2021 16:03
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 tilomitra/da513e32bb78f9f6ce4cb8a634c44ce5 to your computer and use it in GitHub Desktop.
Save tilomitra/da513e32bb78f9f6ce4cb8a634c44ce5 to your computer and use it in GitHub Desktop.
Run this through parceljs to embed on a Square Store via Snippets API
import React from "react";
import ReactDOM from "react-dom";
function Frontend() {
return <div>Sample Snippet Content - TESTING*******************</div>;
}
// self executing function here
(function () {
// your page initialization code here
// the DOM will be available here
const elem = document.createElement("div");
document.getElementById("app").appendChild(elem);
ReactDOM.render(<Frontend />, elem);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment