react-template-slots
v0.2.0
Published
Template slots for react
Downloads
6
Readme
react-template-slots
example usage
- before:
import { View, Slot, Template } from 'react-template-slots';
const Layout = () => (
<div>
<header>
<Slot name="header"/>
</header>
</div>
);
export default () => (
<View view={<Layout/>}>
<Template slot="header">
<div>header</div>
</Template>
</View>
);
- after:
<div>
<header>
<div>header</div>
</header>
</div>