mirror of
https://github.com/fooflington/selfdefined.git
synced 2025-06-14 14:20:48 +00:00
update
This commit is contained in:
16
node_modules/bs-recipes/recipes/webpack.preact-hot-loader/app/js/main.js
generated
vendored
Normal file
16
node_modules/bs-recipes/recipes/webpack.preact-hot-loader/app/js/main.js
generated
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
import {h, render} from 'preact';
|
||||
|
||||
if (module.hot) {
|
||||
module.hot.accept('./HelloWorld.jsx', () => requestAnimationFrame(() => {
|
||||
init();
|
||||
}));
|
||||
}
|
||||
|
||||
let root;
|
||||
|
||||
function init() {
|
||||
const HellowWorld = require('./HelloWorld.jsx').default;
|
||||
root = render(<HellowWorld />, document.getElementById('preact-root'), root);
|
||||
}
|
||||
|
||||
init();
|
Reference in New Issue
Block a user