Skip to content

Instantly share code, notes, and snippets.

@amirilovic
Created June 15, 2022 19:45
Show Gist options
  • Save amirilovic/77e9dd68215343b62edbd73579016a3b to your computer and use it in GitHub Desktop.
Save amirilovic/77e9dd68215343b62edbd73579016a3b to your computer and use it in GitHub Desktop.
(function (root, factory) {
if (typeof define === "function" && define.amd) {
define(["react"], factory);
} else if (typeof exports === "object") {
module.exports = factory(require("react"));
} else {
root.Title = factory(root.React);
}
}(this, function (React) {
return function Title({ text }) {
return React.createElement('h1', null, text)
}
}));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment