Creating a MetacityGL App
Making a react-based app with MetacityGL
import React from 'react'
import { MetacityGL, Utils } from 'metacitygl';
import 'metacitygl/style.css';
export function Application() {
React.useEffect(() => {
return () => {
//recommended force cleaning up the rendering context
window.location.reload();
}
}, []);
return (
<MetacityGL background={0x000000}>
//insert your layers here
</MetacityGL>
)
}
Last updated