Skip to content

stagfoo/joro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

52 Commits

Repository files navigation

Load dom nodes and strings like dependencies with no duplicates



Installation

npm install joro --save

Why make this?

  • JSS is over complicated for small projects
  • Its easy to add styles for functional components
  • its tiny, simple functional and i love using it.

Examples

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

ko-fi

About

馃暦锔忦煏革笍 Load dom nodes and strings like dependencies with no duplicates

Topics

Resources

Stars

Watchers

Forks