sun
Simple little virtual DOM node builder for Preact.
Example
let render = let div span strong = const App = div // <div class="App"><span>hello</span><strong>matt</strong></div>
Features
- Functions for all valid HTML elements
- Functions for all valid HTML attributes on each element
- Supports custom attributes (e.g.
span({ custom: 'attribute' })('hi there!')
) - Proudly built for Preact
Installation
npm install sun
High-Order Components
High-Order Components are a powerful technique for modifying children on the fly. Here's how you can do it with sun.
let render = let component = let styling = let app = styling div assert
Where you can Help
- Performance tuning
- React support
Test
npm installmake test
License
MIT