All Projects → mjanssen → preact-route-async

mjanssen / preact-route-async

Licence: MIT license
Easy asynchronous loading for your router components. For 440B.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to preact-route-async

preact-views
📺 Named views for Preact, with easy-as-pie linking between them.
Stars: ✭ 39 (+8.33%)
Mutual labels:  preact, preact-components, preact-router
preact-mdc
material design components for preact using material-components-web sass styles (for live demo click the link below)
Stars: ✭ 23 (-36.11%)
Mutual labels:  preact, preact-components
preact-perf-profiler
A HOC to enable measuring rendering performance for Preact components
Stars: ✭ 18 (-50%)
Mutual labels:  preact, preact-components
preact-token-input
🔖 A text field that tokenizes input, for things like tags.
Stars: ✭ 57 (+58.33%)
Mutual labels:  preact, preact-components
preact-polka-ssr
Preact SSR using Polka
Stars: ✭ 27 (-25%)
Mutual labels:  preact, preact-router
preact-component-console
A console emulator for preact.
Stars: ✭ 29 (-19.44%)
Mutual labels:  preact, preact-components
preact-motion
A fork of React-Motion to be used with Preact
Stars: ✭ 28 (-22.22%)
Mutual labels:  preact, preact-components
preact-custom-scrollbars
⇅ Preact scrollbars component
Stars: ✭ 20 (-44.44%)
Mutual labels:  preact, preact-components
preact-bind-group
Preact Component to Group Form fields onChange Events to a single Callback
Stars: ✭ 25 (-30.56%)
Mutual labels:  preact, preact-components
Zero To Preact
A Step-by-step Guide to Preact + Webpack 2, without boilerplate!
Stars: ✭ 185 (+413.89%)
Mutual labels:  preact
Hydux
A light-weight type-safe Elm-like alternative for Redux ecosystem, inspired by hyperapp and Elmish
Stars: ✭ 216 (+500%)
Mutual labels:  preact
Val
VirtualDOM abstraction layer - give yourself better integration and full control over the DOM with any virtual DOM library that uses a Hyperscript-like API such as React and Preact.
Stars: ✭ 181 (+402.78%)
Mutual labels:  preact
Bolt
The Bolt Design System provides robust Twig and Web Component-powered UI components, reusable visual styles, and powerful tooling to help developers, designers, and content authors build, maintain, and scale best of class digital experiences.
Stars: ✭ 186 (+416.67%)
Mutual labels:  preact
Facebook Political Ads
Monitoring Facebook Political Ads
Stars: ✭ 215 (+497.22%)
Mutual labels:  preact
Vaporboy
Gameboy / Gameboy Color Emulator PWA built with Preact. ⚛️ Powered by wasmBoy. 🎮Themed with VaporWave. 🌴🐬
Stars: ✭ 182 (+405.56%)
Mutual labels:  preact
preact-cli-sw-precache
Preact cli plugin for configuring sw-precache
Stars: ✭ 19 (-47.22%)
Mutual labels:  preact
Preact Mdl
💥 A collection of Preact Components that encapsulate Google's Material Design Lite.
Stars: ✭ 179 (+397.22%)
Mutual labels:  preact
Preact Render Spy
Render preact components with access to the produced virtual dom for testing.
Stars: ✭ 178 (+394.44%)
Mutual labels:  preact
vitext
The Next.js like React framework for better User & Developer experience!
Stars: ✭ 376 (+944.44%)
Mutual labels:  preact
Prefresh
Hot Module Reloading for Preact
Stars: ✭ 247 (+586.11%)
Mutual labels:  preact

Preact route async

npm gzip size

Asynchronous loading for Preact Router. For 440B.

Inspired by preact-async-route. Bundled with 📦 Microbundle

Install

npm install --save preact-route-async

Usage

import Router from 'preact-router';
import Route from 'preact-route-async';

<Router>
  <Route path="/" component={Home} />
  <Route
    path="/user"
    user={user}
    getComponent={() => import('./pages/user.js')}
  />
</Router>

Options

Props and children wil automatically be passed to the fetched Component. The library also passes the path property, coming from preact-router to the Component.

Demo

Code demo can be found here

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].