Load dom nodes and strings like dependencies with no duplicates
npm install joro --save
- JSS is over complicated for small projects
- Its easy to add styles for functional components
- its tiny, simple functional and i love using it.
var html = require('nanohtml')
var joro = require('joro');
var styles = new joro();
function HeaderComponent(){
styles.add("HeaderComponent", `
h1 { color: hotpink }
`)
var el = html`
<h1>Hello planet</h1>
`
document.body.appendChild(el)
}
congratulation its a functional component 🎉
You can add HTML nodes on route change of styles, mount points or anything! 🌈
var page = require('pagejs')
var styles = new joro();
page('/user', () => {
styles.add("HeaderComponent", `
.user-profile { color: hotpink }
`)
loadTheUI();
})
#Support