Create a file that exports an array of elements to create a component you can use in a main view.
nav.js:
nav.js
import {Header,Text} from 'javascript-ui'; export default [ Header([ Image('logo.png') ]), ];
main.js:
main.js
import {view} from 'javascript-ui'; import * as Nav from './nav.js' window.onload = () => { view([ Nav, Section([ // .. ]), ]), };
There was an error while loading. Please reload this page.