1.0.23 • Published 2 years ago

oxigen-router v1.0.23

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Oxigen router

Oxigen router helps you to change the state of the application moving from one state to another while maintaining application persistence.

Usage

import Component, { sass, html } from "oxigen-core";
import { Switch, Scope, Route, View } from "oxigen-router";

const App = Component({
	taged: "oxi-app",
	define: [Switch, Scope, Route, View],
	styles() {
		return sass\`
			*, :host {
				box-sizing: border-box;
			}
			:host {
				display: block;
				width: 100%;
				max-width: 1200px;
				padding: 1rem;
				margin: auto;
			}
		\`;
	},
	render() {
		return html\`
			<oxi-view>
				<oxi-switch>
					<oxi-route path="/" name="home">
						<h1>Home</h1>
					</oxi-route>
					<oxi-scope path="/view">
						<oxi-route path="/1" name="view-1">
							<h1>View 1</h1>
						</oxi-route>
						<oxi-route path="/2" name="view-2">
							<h1>View 2</h1>
						</oxi-route>
						<oxi-route path="/3" name="view-3">
							<h1>View 3</h1>
						</oxi-route>
					</oxi-scope>
					<oxi-route path="/404" name="404">
						<h1>404</h1>
					</oxi-route>
				</oxi-switch>
			</oxi-view>
		\`;
	},
});

App.define();
1.0.23

2 years ago

1.0.22

2 years ago

1.0.21

2 years ago

1.0.20

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago