As easy as 1, 2, 3!
Updated:
- Aug, 08, 2022 update
config
docs for npm 8+ - Jul 27, 2021 add private scopes
- Jul 22, 2021 add dist tags
- Jun 20, 2021 update for
--access=public
- Sep 07, 2020 update docs for
npm version
Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');
// mozaik-demo/src/App.jsx | |
import React from 'react'; | |
import Mozaik from 'mozaik/browser'; | |
import Realtime from './Realtime.jsx'; | |
Mozaik.Registry.add('realtime.example', Realtime); | |
const MozaikComponent = Mozaik.Component.Mozaik; | |
React.render(<MozaikComponent/>, document.getElementById('mozaik')); |