nueva
    TypeScript icon, indicating that this package has built-in type declarations

    0.1.2-alpha2 • Public • Published

    Nueva

    npm license

    A reactive component based UI library used for making user interfaces.

    Usage

    • npm:
    npm install nueva
    • yarn:
    yarn add nueva
    • cdn:
    <script src="https://unpkg.com/nueva@{latest_version}"></script>

    Examples

    • With package managers

    Use rollup or webpack or parcel for bundling. Example config for rollup with plugin-node-resolve

    import { nodeResolve } from '@rollup/plugin-node-resolve';
    export default {
      input: 'entry-point.js',
      output: {
        file: 'output-file.js',
        format: 'es'
      },
      plugin: [nodeResolve()] 
    }

    Then use nueva, for example

    import {
      Component,
      createElem,
      render
    } from 'nueva';
    
    class App extends Component {
      render() {
        return createElem(
          'div',
          createElem('h1', 'I am H1'),
          createElem('h2', 'I am H2')
        )
      }
    }
    render(createElem(new App()), document.getElementById('app'))
    • For CDN
    class App extends nueva.Component {
      render() {
        return nueva.createElem(
          'div',
          nueva.createElem('h1', 'I am H1'),
          nueva.createElem('h2', 'I am H2')
        )
      }
    }
    nueva.render(nueva.createElem(new App()), document.getElementById('app'))

    Keywords

    Install

    npm i nueva

    DownloadsWeekly Downloads

    0

    Version

    0.1.2-alpha2

    License

    MIT

    Unpacked Size

    20.5 kB

    Total Files

    18

    Last publish

    Collaborators

    • codingwith3dv