1.0.6 • Published 3 years ago

@capsular/nested-js v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

nested-js

The library is introducing a new way of making web templates only using javascript. The purpose of the library is to allow developers to make web applications only using javascript to manage the code easily and for making rich dynamic templates.

Features

  • Create HTML templates using javascript
  • Binding events on HTML elements
  • Binding attributes on HTML elements

Installation

npm i @capsular/nested-js

Examples

nested-js application

import { renderContent, div, h1, p } from "@capsular/nested-js"

function App() {
  return div(
    h1('nested-js'),
    p('Welcome to nested-js')
  )
}

renderContent(App, document.getElementBy('root')

Components

function HeaderComponent() {
  return div(
    'Header Component'
  )
}

export default HeaderComponent

...
div(
  'Inject custom components',
  
  HeaderComponent,
  
  div('body component'),
  
  BodyComponent,
  
  span('All rights reserved'),
  
  FooterComponent,
)
...

License

MIT

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago