Skip to content

Views & Controllers

Brandon Jordan edited this page Dec 14, 2025 · 2 revisions

View Controller

Create a view controller to switch between rendered views.

const controller = new ViewController('#selector');

controller.load(view1);

// Animates using fade to transition between the views
controller.load(view2);

Views

Create a view and pass it to a controller. You may want to have a views folder with files that default export a view.

export default new View((view, controller) => {
    return createElement(...)
});

Clone this wiki locally