snabbdom-slot
shadowDom slot system like for snabbdom stateless components
Features
✓ slot system based on web component / shadowDOM spec
✓ works with JSX or hyperscript
Usage
import withSlot from 'snabbdom-slot'import Snabbdom from 'snabbdom-pragma' const Component = const tree = <Component ="great"> <div ="header">Custom title</div> <div ="footer">All rights reserved</div> <div>Main content</div> <div>More content</div> </Component> //render tree with snabbdom
Output
My great component Custom title Main content More content All rights reserved
Check this for more info about slot element behavior
License
Copyright © 2015-2016 Luiz Américo Pereira Câmara. This source code is licensed under the MIT license found in the LICENSE.txt file. The documentation to the project is licensed under the CC BY-SA 4.0 license.