How to use the preact-router.exec function in preact-router

To help you get started, we’ve selected a few preact-router examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github preactjs / preact-router / src / match.js View on Github external
render(props) {
		let url = this.nextUrl || getCurrentUrl(),
			path = url.replace(/\?.+$/,'');
		this.nextUrl = null;
		return props.children({
			url,
			path,
			matches: exec(path, props.path, {}) !== false
		});
	}
}

preact-router

Connect your components up to that address bar.

MIT
Latest version published 1 year ago

Package Health Score

66 / 100
Full package analysis