Skip to content

Repository files navigation

lazy-render

A helper to render React components for lazy-router (or whatever)

Usage

constrouter=require('lazy-router')('/404')constrender=require('lazy-render')('#app')constLazyComponent=require('./my-component')router.on('/lazy-routing',(path,location)=>render(LazyComponent,{location}))

API

render(mountPoint: selector) -> (Component: HTMLComponent, props: object): void

render returns a function which will mount a given component in the DOM at the location specified via the mountPoint selector, and additionally pass any properties specified into the component.

License

Copyright © 2017 Script LLC. Apache-2.0 licensed

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages