mirror of
				https://github.com/fooflington/selfdefined.git
				synced 2025-11-03 23:29:03 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			17 lines
		
	
	
		
			342 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			342 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
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();
 |